@@ -1194,12 +1194,12 @@ public UserAccount updateUser(UpdateUserCmd updateUserCmd) {
11941194 *
11951195 * If all checks pass, we encode the given password with the most preferable password mechanism given in {@link #_userPasswordEncoders}.
11961196 */
1197- protected void validateUserPasswordAndUpdateIfNeeded (String password , UserVO user , String oldPassword ) {
1198- if (password == null ) {
1197+ protected void validateUserPasswordAndUpdateIfNeeded (String newPassword , UserVO user , String oldPassword ) {
1198+ if (newPassword == null ) {
11991199 s_logger .trace ("No new password to update for user: " + user .getUuid ());
12001200 return ;
12011201 }
1202- if (StringUtils .isBlank (password )) {
1202+ if (StringUtils .isBlank (newPassword )) {
12031203 throw new InvalidParameterValueException ("Password cannot be empty or blank." );
12041204 }
12051205 Account callingAccount = getCurrentCallingAccount ();
@@ -1213,13 +1213,13 @@ protected void validateUserPasswordAndUpdateIfNeeded(String password, UserVO use
12131213 throw new InvalidParameterValueException ("You must inform the old password when updating a user password." );
12141214 }
12151215 if (CollectionUtils .isEmpty (_userPasswordEncoders )) {
1216- throw new CloudRuntimeException ("No user authenticatiors configured!" );
1216+ throw new CloudRuntimeException ("No user authenticators configured!" );
12171217 }
12181218 if (!isAdmin ) {
12191219 validateOldPassword (user , oldPassword );
12201220 }
12211221 UserAuthenticator userAuthenticator = _userPasswordEncoders .get (0 );
1222- String newPasswordEncoded = userAuthenticator .encode (password );
1222+ String newPasswordEncoded = userAuthenticator .encode (newPassword );
12231223 user .setPassword (newPasswordEncoded );
12241224 }
12251225
0 commit comments