Skip to content

Commit

Permalink
Revert NC change to be able to authenticate with email address - webd…
Browse files Browse the repository at this point in the history
…av clients

(cherry picked from commit 437ad79)
  • Loading branch information
sgyuris committed Sep 17, 2024
1 parent 264cd2d commit fa536ab
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 @@ -438,15 +438,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 fa536ab

Please sign in to comment.