Update# check if existing user has the same email

This commit is contained in:
Pellaeon Lin 2015-06-04 20:51:47 +08:00
parent 4566b1f554
commit e7d97cf778
1 changed files with 9 additions and 0 deletions

View File

@ -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);