diff --git a/framework/common/servicedef/services.xml b/framework/common/servicedef/services.xml index ffc9ff4b9e..409a1396f3 100644 --- a/framework/common/servicedef/services.xml +++ b/framework/common/servicedef/services.xml @@ -408,6 +408,7 @@ under the License. + 0) { userLogin.set("successiveFailedLogins", Long.valueOf(0)); } else if (!hasLoggedOut) { - // successful login & no loggout flag, no need to change anything, so don't do the store + // successful login & no logout flag, no need to change anything, so don't do the store doStore = false; } @@ -709,7 +709,8 @@ public class LoginServices { } else { userLoginToUpdate.set("currentPassword", useEncryption ? HashCrypt.cryptUTF8(getHashType(), null, newPassword) : newPassword, false); userLoginToUpdate.set("passwordHint", passwordHint, false); - userLoginToUpdate.set("requirePasswordChange", "N"); + // optional parameter in service definition "requirePasswordChange" to update a password to a new generated value that has to be changed by the user + userLoginToUpdate.set("requirePasswordChange", ("Y".equals(context.get("requirePasswordChange")) ? "Y" : "N")); try { userLoginToUpdate.store();