Changeset 14312


Ignore:
Timestamp:
2007-08-06T11:44:49+12:00 (15 years ago)
Author:
qq6
Message:

updated modify user's info

File:
1 edited

Legend:

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

    r14289 r14312  
    179179    String sql_modify_user_info="update " + USERS +" set ";
    180180    if (new_password!=null && !new_password.equals("")){
    181         sql_modify_user_info += "password='" + new_password +"'";
    182     }
    183     if (groups!=null && !groups.equals("")){
    184         sql_modify_user_info += ", groups='" + groups + "'";
    185     }
    186     if(accountstatus!=null && !accountstatus.equals("")){
    187         sql_modify_user_info += ", accountstatus='" + accountstatus + "'";
    188     }
    189 
    190     if (comment!=null && !comment.equals("")){
    191         sql_modify_user_info += ", comment='" + comment + "'";
    192     }
    193    
    194     sql_modify_user_info+=" where username='" + username+"'";
     181        sql_modify_user_info += "password='" + new_password +"', ";
     182    }
     183   
     184    sql_modify_user_info += "groups='" + groups + "'" + ", accountstatus='" + accountstatus + "'" + ", comment='" + comment + "'" + " where username='" + username+"'";
    195185    try{
    196186        System.out.println(sql_modify_user_info);
Note: See TracChangeset for help on using the changeset viewer.