public int changePassword ( Task task , String strUserName , String strCurrentPassword , String strNewPassword ) { int iErrorCode = Constants . NORMAL_RETURN ; org . jbundle . thin . base . remote . RemoteTask remoteTask = ( org . jbundle . thin . base . remote . RemoteTask ) this . getRemoteTask ( null , strUserName , false ) ; Map < String , Object > properties = new HashMap < String , Object > ( ) ; properties . put ( Params . USER_NAME , strUserName ) ; properties . put ( Params . PASSWORD , strCurrentPassword ) ; properties . put ( "newPassword" , strNewPassword ) ; try { Object objReturn = remoteTask . doRemoteAction ( ThinMenuConstants . CHANGE_PASSWORD , properties ) ; if ( objReturn instanceof Integer ) iErrorCode = ( ( Integer ) objReturn ) . intValue ( ) ; } catch ( Exception ex ) { return task . setLastError ( ex . getMessage ( ) ) ; } return iErrorCode ; }
Change the password .