Changeset 14341


Ignore:
Timestamp:
2007-08-08T15:06:50+12:00 (15 years ago)
Author:
qq6
Message:

fixed modifyUserInfo()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/gsdl3/util/DerbyWrapper.java

    r14338 r14341  
    198198    String sql_modify_user_info="update " + USERS +" set ";
    199199    if (new_password!=null && !new_password.equals("")){
    200         sql_modify_user_info += "password='" + new_password +"', ";
    201     }
    202    
    203     sql_modify_user_info += "groups='" + groups + "'" + ", accountstatus='" + accountstatus + "'" + ", comment='" + comment + "'" + " where username='" + username+"'";
     200        sql_modify_user_info += "password='" + new_password +"'";
     201    }
     202
     203    if (groups!=null && accountstatus!=null && comment!=null){
     204    sql_modify_user_info += ", groups='" + groups + "'" + ", accountstatus='" + accountstatus + "'" + ", comment='" + comment + "'";
     205    }
     206    sql_modify_user_info +=" where username='" + username+"'";
     207   
    204208    try{
    205209        System.out.println(sql_modify_user_info);
Note: See TracChangeset for help on using the changeset viewer.