Update LostController.php

i would be useful to know who is trying to reset the password (misspelled username or email, ex user or some sort of attack)

Signed-off-by: NoSleep82 <52562874+NoSleep82@users.noreply.github.com>
This commit is contained in:
NoSleep82
2022-08-19 18:30:32 +02:00
committed by GitHub
parent 4a77a68734
commit 61548c520b

View File

@@ -314,7 +314,7 @@ class LostController extends Controller {
$user = $this->userManager->get($input);
if ($user instanceof IUser) {
if (!$user->isEnabled()) {
throw new ResetPasswordException('User is disabled');
throw new ResetPasswordException('User ' . $user . ' is disabled');
}
return $user;
@@ -328,6 +328,6 @@ class LostController extends Controller {
return reset($users);
}
throw new ResetPasswordException('Could not find user');
throw new ResetPasswordException('Could not find user ' . $input);
}
}