Skip to content

Commit

Permalink
UserManager: Reserved cloud login for future use.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Oct 8, 2020
1 parent b5eacda commit f3d80f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/User/UserManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ private function fallbackAuthenticate(UserLoginAttempt $attempt, string $usernam
try {
$user = $this->getUserByUsername($username);
} catch (NoResultException | NonUniqueResultException $e) {
if (($externalEmail = $this->authenticateByCloudAccount($username, $password)) !== null) {
$user = $this->entityManager->persist($user = new User($username, $password, $externalEmail))->flush($user);
} else {
throw new AuthenticationException('The username is incorrect. Username "' . $username . '" given.');
}
// TODO: Reserved for future use
// TODO: if (($externalEmail = $this->authenticateByCloudAccount($username, $password)) !== null) {
// TODO: $user = $this->entityManager->persist($user = new User($username, $password, $externalEmail))->flush($user);
// TODO: } else {
throw new AuthenticationException('The username is incorrect. Username "' . $username . '" given.');
}

$attempt->setUser($user);
Expand Down

0 comments on commit f3d80f1

Please sign in to comment.