diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index b6d6adf6523a8..2eae0ffe627b4 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -456,15 +456,8 @@ public function logClientIn($user, return false; } - if ($isTokenPassword) { - $dbToken = $this->tokenProvider->getToken($password); - $userFromToken = $this->manager->get($dbToken->getUID()); - $isValidEmailLogin = $userFromToken->getEMailAddress() === $user - && $this->validateTokenLoginName($userFromToken->getEMailAddress(), $dbToken); - } else { $users = $this->manager->getByEmail($user); $isValidEmailLogin = (\count($users) === 1 && $this->login($users[0]->getUID(), $password)); - } if (!$isValidEmailLogin) { $this->handleLoginFailed($throttler, $currentDelay, $remoteAddress, $user, $password);