Removed error message

pull/1293/head
Tim Zandbergen 2025-01-06 18:14:55 +01:00 committed by GitHub
parent 085af72e14
commit 6eef9dc6ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 5 deletions

View File

@ -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');
}
}