From e7d97cf77888f283f358ac3b3136a163cb4d7b26 Mon Sep 17 00:00:00 2001 From: Pellaeon Lin Date: Thu, 4 Jun 2015 20:51:47 +0800 Subject: [PATCH] Update# check if existing user has the same email --- controller/registercontroller.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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);