diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 90ae35584787a..d0c123060cf82 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -457,15 +457,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);