From 4202c276b4159f0e86e044e273fc62b46d17a0b2 Mon Sep 17 00:00:00 2001 From: Sylvester <533123+sharkooon@users.noreply.github.com> Date: Fri, 28 Mar 2025 15:03:08 +0100 Subject: [PATCH] Update PasswordManagementTrait.php Fix password reset flow: redirect to login action if no user is found. --- src/Controller/Traits/PasswordManagementTrait.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controller/Traits/PasswordManagementTrait.php b/src/Controller/Traits/PasswordManagementTrait.php index 3f712e48..72de4a41 100644 --- a/src/Controller/Traits/PasswordManagementTrait.php +++ b/src/Controller/Traits/PasswordManagementTrait.php @@ -186,6 +186,7 @@ public function requestResetPassword() 'If the account is valid, the system will send an instructional email to the address on record.', ); $this->Flash->success($msg); + return $this->redirect(['action' => 'login']); } catch (Exception $exception) { $msg = __d('cake_d_c/users', 'There was an error please contact Administrator'); $this->Flash->error($msg);