From 5874bcd35c81240c26234f828309e406517feeee Mon Sep 17 00:00:00 2001 From: quietone Date: Mon, 25 Nov 2024 16:48:51 +1300 Subject: [PATCH] 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 --- core/modules/user/src/Controller/UserController.php | 2 +- core/modules/user/tests/src/Functional/UserLoginHttpTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/user/src/Controller/UserController.php b/core/modules/user/src/Controller/UserController.php index 3a6a33cfb3d..8e271fa9819 100644 --- a/core/modules/user/src/Controller/UserController.php +++ b/core/modules/user/src/Controller/UserController.php @@ -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); diff --git a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php index 773f7c48a1a..753dda03956 100644 --- a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php +++ b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php @@ -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.'); } }