From 490eda4f4ac1b5f5a459aa543b45e374cbfe2bbe Mon Sep 17 00:00:00 2001 From: bruno DA SILVA Date: Thu, 5 Dec 2019 09:54:27 +0100 Subject: [PATCH] =?UTF-8?q?n=C2=B0524=20-=20password=20policy=20bugfix=20:?= =?UTF-8?q?=20Enter=20Password=20phrase=20no=20more=20lack=20the=20userNam?= =?UTF-8?q?e=20and=20is=20properly=20displayed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/loginwebpage.class.inc.php | 2 +- templates/login/password/resetpwdform.html.twig | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/loginwebpage.class.inc.php b/application/loginwebpage.class.inc.php index b1fef599c..d834b7317 100644 --- a/application/loginwebpage.class.inc.php +++ b/application/loginwebpage.class.inc.php @@ -267,6 +267,7 @@ class LoginWebPage extends NiceWebPage else { $aVars['bNoUser'] = false; + $aVars['sUserName'] = $oUser->GetFriendlyName(); $oEncryptedToken = $oUser->Get('reset_pwd_token'); if (!$oEncryptedToken->CheckPassword($sToken)) @@ -276,7 +277,6 @@ class LoginWebPage extends NiceWebPage else { $aVars['bBadToken'] = false; - $aVars['sUserName'] = $oUser->GetFriendlyName(); } } diff --git a/templates/login/password/resetpwdform.html.twig b/templates/login/password/resetpwdform.html.twig index bf18e24c6..7b1eb9904 100644 --- a/templates/login/password/resetpwdform.html.twig +++ b/templates/login/password/resetpwdform.html.twig @@ -12,10 +12,13 @@ {% elseif bBadToken and sErrorMessage is null %}

{{ 'UI:ResetPwd-Error-InvalidToken'|dict_s }}

{% else %} + {% if sUserName is not empty %} +

{{ 'UI:ResetPwd-Error-EnterPassword'|dict_format(sUserName) }}

+ {% endif %} + {% if sErrorMessage is not null %}

{{ sErrorMessage|raw }}

{% endif %} -

{{ 'UI:ResetPwd-Error-EnterPassword'|dict_format(sUserName) }}