Changeset 14341

Show
Ignore:
Timestamp:
08.08.2007 15:06:50 (12 years ago)
Author:
qq6
Message:

fixed modifyUserInfo()

Files:
1 modified

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);