From 6eef9dc6ea116a1fcfece28008166ca1e23808dc Mon Sep 17 00:00:00 2001 From: Tim Zandbergen Date: Mon, 6 Jan 2025 18:14:55 +0100 Subject: [PATCH] Removed error message --- src/psm/Module/User/Controller/LoginController.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/psm/Module/User/Controller/LoginController.php b/src/psm/Module/User/Controller/LoginController.php index 4c50272d..ca62f587 100644 --- a/src/psm/Module/User/Controller/LoginController.php +++ b/src/psm/Module/User/Controller/LoginController.php @@ -93,7 +93,8 @@ class LoginController extends AbstractController { if (isset($_POST['user_name'])) { $user = $this->getUser()->getUserByUsername($_POST['user_name']); - + $this->addMessage(psm_get_lang('login', 'success_password_forgot'), 'success'); + if (!empty($user)) { $token = $this->getUser()->generatePasswordResetToken($user->user_id); // we have a token, send it along @@ -102,11 +103,8 @@ class LoginController extends AbstractController $user->email, $token ); - - $this->addMessage(psm_get_lang('login', 'success_password_forgot'), 'success'); + return $this->executeLogin(); - } else { - $this->addMessage(psm_get_lang('login', 'error_user_incorrect'), 'error'); } }