aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Controller/LostController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php
index cee3837ac5a..a8c459a32e1 100644
--- a/core/Controller/LostController.php
+++ b/core/Controller/LostController.php
@@ -172,7 +172,8 @@ class LostController extends Controller {
*/
protected function checkPasswordResetToken(string $token, string $userId): void {
try {
- $this->verificationToken->check($token, $this->userManager->get($userId), 'lostpassword', '', true);
+ $user = $this->userManager->get($userId);
+ $this->verificationToken->check($token, $user, 'lostpassword', $user ? $user->getEMailAddress() : '', true);
} catch (InvalidTokenException $e) {
$error = $e->getCode() === InvalidTokenException::TOKEN_EXPIRED
? $this->l10n->t('Could not reset password because the token is expired')