Skip to content

Commit b63fc4e

Browse files
authored
Simplify email login validation logic
1 parent e73a2b0 commit b63fc4e

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/private/User/Session.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -410,15 +410,8 @@ public function logClientIn($user,
410410
return false;
411411
}
412412

413-
if ($isTokenPassword) {
414-
$dbToken = $this->tokenProvider->getToken($password);
415-
$userFromToken = $this->manager->get($dbToken->getUID());
416-
$isValidEmailLogin = $userFromToken->getEMailAddress() === $user
417-
&& $this->validateTokenLoginName($userFromToken->getEMailAddress(), $dbToken);
418-
} else {
419-
$users = $this->manager->getByEmail($user);
420-
$isValidEmailLogin = (\count($users) === 1 && $this->login($users[0]->getUID(), $password));
421-
}
413+
$users = $this->manager->getByEmail($user);
414+
$isValidEmailLogin = (\count($users) === 1 && $this->login($users[0]->getUID(), $password));
422415

423416
if (!$isValidEmailLogin) {
424417
$this->handleLoginFailed($throttler, $currentDelay, $remoteAddress, $user, $password);

0 commit comments

Comments
 (0)