public User changePasswordForLoggedInUser ( String existingPasswordParam , String newPasswordParam , String confirmNewPasswordParam ) { User toChangePasswordFor = new User ( ) ; if ( this . serviceTicket != null ) { toChangePasswordFor . setServiceTicket ( this . serviceTicket ) ; } String existingPassword = existingPasswordParam == null ? UtilGlobal . EMPTY : existingPasswordParam ; String newPassword = newPasswordParam == null ? UtilGlobal . EMPTY : newPasswordParam ; String confirmNewPassword = confirmNewPasswordParam == null ? UtilGlobal . EMPTY : confirmNewPasswordParam ; JSONObject passwordClear = new JSONObject ( ) ; passwordClear . put ( "existing" , existingPassword ) ; passwordClear . put ( "new" , newPassword ) ; passwordClear . put ( "confirm_new" , confirmNewPassword ) ; toChangePasswordFor . setPasswordClear ( passwordClear . toString ( ) ) ; return new User ( this . postJson ( toChangePasswordFor , WS . Path . User . Version1 . changePassword ( ) ) ) ; }
Change the password for the currently logged in user .