From 92e5489ad8356942786d5b8573f5a139f98b4141 Mon Sep 17 00:00:00 2001 From: Dmytro Rublov Date: Sat, 14 Jan 2023 15:10:58 -0800 Subject: [PATCH] Improved password reset reliability --- system/Controllers/ControllerFrontendAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Controllers/ControllerFrontendAuth.php b/system/Controllers/ControllerFrontendAuth.php index 00ee77f..54b6e19 100644 --- a/system/Controllers/ControllerFrontendAuth.php +++ b/system/Controllers/ControllerFrontendAuth.php @@ -147,7 +147,7 @@ class ControllerFrontendAuth extends ControllerShared return $response->withRedirect($this->c->router->pathFor('auth.recoverpwshow')); } - $requiredUser = $user->getSecureUser($requiredUser[0]); + $requiredUser = $user->getSecureUser($requiredUser['username']); $requiredUser['recoverdate'] = date("Y-m-d H:i:s"); $requiredUser['recovertoken'] = bin2hex(random_bytes(32));