Merge pull request #10895 from mpellegrin/develop

#9480 Password link broken if login contains space
This commit is contained in:
Laurent Destailleur 2019-03-21 18:24:21 +01:00 committed by GitHub
commit 6c2bd13b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1976,7 +1976,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";