diff --git a/controller/registercontroller.php b/controller/registercontroller.php index 00c21e5..a87268a 100644 --- a/controller/registercontroller.php +++ b/controller/registercontroller.php @@ -80,6 +80,15 @@ class RegisterController extends Controller { ), 'error'); } + if ( !empty($this->config->getUsersForUserValue('settings', 'email', $email)) ) { + return new TemplateResponse('', 'error', array( + 'errors' => array(array( + 'error' => $this->l10n->t('There is an existing user with this email'), + 'hint' => '' + )) + ), 'error'); + } + // FEATURE: allow only from specific email domain $token = $this->pendingreg->save($email);