Merge pull request #7917 from Quadra-Digital/bug-fix-change-password

Bug Fix - Change Password Page
This commit is contained in:
Loz Calver 2018-03-07 15:14:49 +00:00 committed by GitHub
commit ef63e42e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,21 +112,19 @@ class ChangePasswordHandler extends RequestHandler
}
// Show a friendly message saying the login token has expired
if ($token !== null && $member && !$member->validateAutoLoginToken($token)) {
$message = [
'Content' => DBField::create_field(
'HTMLFragment',
_t(
'SilverStripe\\Security\\Security.NOTERESETLINKINVALID',
'<p>The password reset link is invalid or expired.</p>'
. '<p>You can request a new one <a href="{link1}">here</a> or change your password after'
. ' you <a href="{link2}">logged in</a>.</p>',
[
'link1' => $this->link('lostpassword'),
'link2' => $this->link('login')
]
)
$message = DBField::create_field(
'HTMLFragment',
_t(
'SilverStripe\\Security\\Security.NOTERESETLINKINVALID',
'<p>The password reset link is invalid or expired.</p>'
. '<p>You can request a new one <a href="{link1}">here</a> or change your password after'
. ' you <a href="{link2}">logged in</a>.</p>',
[
'link1' => $this->link('lostpassword'),
'link2' => $this->link('login')
]
)
];
);
return [
'Content' => $message,