Fix remove action param in url to allow a second try without the error

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

View File

@@ -40,6 +40,7 @@ if (!empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax = 1;
$php_self = $_SERVER['PHP_SELF'];
$php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : '';
$php_self = str_replace('action=validatenewpassword', '', $php_self);
$titleofpage = $langs->trans('SendNewPassword');

View File

@@ -1838,7 +1838,7 @@ class User extends CommonObject
/**
* Change password of a user
*
* @param User $user Object user of user making change
* @param User $user Object user of user requesting the change (not the user for who we change the password). May be unknown.
* @param string $password New password in clear text (to generate if not provided)
* @param int $changelater 1=Change password only after clicking on confirm email
* @param int $notrigger 1=Does not launch triggers
@@ -2029,7 +2029,7 @@ class User extends CommonObject
$mesg .= $outputlangs->transnoentitiesnoconv("ClickHereToGoTo", $appli).': '.$url."\n\n";
$mesg .= "--\n";
$mesg .= $user->getFullName($outputlangs); // Username that send email
$mesg .= $user->getFullName($outputlangs); // Username that send the email (not the user for who we want to reset password)
dol_syslog(get_class($this)."::send_password changelater is off, url=".$url);
}