Skip to content

Commit

Permalink
Merge #263 [backport27] Revert NC change to be able to authenticate w…
Browse files Browse the repository at this point in the history
…ith email address
  • Loading branch information
memurats committed Jun 26, 2024
2 parents efffa7e + 437ad79 commit b212244
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/private/User/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b212244

Please sign in to comment.