#9480 Password link broken if login contains space

This commit is contained in:
Mathieu Pellegrin 2019-03-21 12:06:43 +01:00 committed by Laurent Destailleur
parent 2995f9c49d
commit e0d89101df

View File

@ -1963,7 +1963,7 @@ class User extends CommonObject
}
else
{
$url = $urlwithroot.'/user/passwordforgotten.php?action=validatenewpassword&username='.$this->login."&passwordhash=".dol_hash($password);
$url = $urlwithroot.'/user/passwordforgotten.php?action=validatenewpassword&username='.urlencode($this->login)."&passwordhash=".dol_hash($password);
$mesg.= $outputlangs->transnoentitiesnoconv("RequestToResetPasswordReceived")."\n";
$mesg.= $outputlangs->transnoentitiesnoconv("NewKeyWillBe")." :\n\n";