Add message during password reset

This commit is contained in:
Laurent Destailleur 2020-05-06 15:30:00 +02:00
parent 1ec8b31e46
commit 485896614b
2 changed files with 3 additions and 1 deletions

View File

@ -78,6 +78,7 @@ UserWillBeExternalUser=Created user will be an external user (because linked to
IdPhoneCaller=Id phone caller IdPhoneCaller=Id phone caller
NewUserCreated=User %s created NewUserCreated=User %s created
NewUserPassword=Password change for %s NewUserPassword=Password change for %s
NewPasswordValidated=Your new password have been validated and must be used now to login.
EventUserModified=User %s modified EventUserModified=User %s modified
UserDisabled=User %s disabled UserDisabled=User %s disabled
UserEnabled=User %s activated UserEnabled=User %s activated

View File

@ -77,6 +77,7 @@ if ($action == 'validatenewpassword' && $username && $passwordhash)
{ {
if (dol_verifyHash($edituser->pass_temp, $passwordhash)) if (dol_verifyHash($edituser->pass_temp, $passwordhash))
{ {
setEventMessages('NewPasswordValidated', null, 'mesgs');
$newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0); $newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0);
dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database");
header("Location: ".DOL_URL_ROOT.'/'); header("Location: ".DOL_URL_ROOT.'/');