Issue #2969406 by bhanu951, robincs, quietone, ranjit1032002, sahil.goyal, urvashi_vora, opdavies, elber, aaronmchale, avpaderno, smustgrave, alberto56, cilefen, benjifisher, lauriii, larowlan, Mahima_Mathur23, nkoporec, borisson_, poker10: Fix incorrect message after resetting password

merge-requests/10362/head
quietone 2024-11-25 16:48:51 +13:00
parent dd2982b532
commit 5874bcd35c
No known key found for this signature in database
GPG Key ID: 43BFBBB26EA09FE1
2 changed files with 2 additions and 2 deletions

View File

@ -260,7 +260,7 @@ class UserController extends ControllerBase {
user_login_finalize($user);
$this->logger->info('User %name used one-time login link at time %timestamp.', ['%name' => $user->getDisplayName(), '%timestamp' => $timestamp]);
$this->messenger()->addStatus($this->t('You have just used your one-time login link. It is no longer necessary to use this link to log in. It is recommended that you set your password.'));
$this->messenger()->addStatus($this->t('You have used a one-time login link. You can set your new password now.'));
// Let the user's password be changed without the current password
// check.
$token = Crypt::randomBytesBase64(55);

View File

@ -605,7 +605,7 @@ class UserLoginHttpTest extends BrowserTestBase {
$resetURL = $urls[0];
$this->drupalGet($resetURL);
$this->submitForm([], 'Log in');
$this->assertSession()->pageTextContains('You have just used your one-time login link. It is no longer necessary to use this link to log in. It is recommended that you set your password.');
$this->assertSession()->pageTextContains('You have used a one-time login link. You can set your new password now.');
}
}