Fix #131: allow user with same email to register

by switching to the new UserManager::getByEmail() API
This commit is contained in:
Pellaeon Lin 2018-04-25 20:38:33 +08:00
parent 98f2f37bbd
commit 15b82cac77
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ class RegistrationService {
return $this->registrationMapper->find($email);
} catch (\Exception $e) {}
if ( $this->config->getUsersForUserValue('settings', 'email', $email) ) {
if ( $this->userManager->getByEmail($email) ) {
throw new RegistrationException(
$this->l10n->t('A user has already taken this email, maybe you already have an account?'),
$this->l10n->t('You can <a href="%s">log in now</a>.', [$this->urlGenerator->getAbsoluteURL('/')])