diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index 057f0a6ef1f85..d2d406ae8eec4 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -124,6 +124,11 @@ protected function checkPasswordResetToken(string $token, string $userId): void $user = $this->userManager->get($userId); $this->verificationToken->check($token, $user, 'lostpassword', $user ? $user->getEMailAddress() : '', true); } catch (InvalidTokenException $e) { + $this->logger->warning('Password reset token check failed', [ + 'user' => $userId, + 'code' => $e->getCode(), + 'exception' => $e, + ]); $error = $e->getCode() === InvalidTokenException::TOKEN_EXPIRED ? $this->l10n->t('Could not reset password because the token is expired') : $this->l10n->t('Could not reset password because the token is invalid');