From 5131b2b2ac811123cf8213bba1d750b6cf92a671 Mon Sep 17 00:00:00 2001 From: Pellaeon Lin Date: Mon, 16 Nov 2015 10:21:23 +0800 Subject: [PATCH] Update# use IMailer to validate email address --- controller/registercontroller.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controller/registercontroller.php b/controller/registercontroller.php index b57b637..59d5db3 100644 --- a/controller/registercontroller.php +++ b/controller/registercontroller.php @@ -64,8 +64,7 @@ class RegisterController extends Controller { */ public function validateEmail() { $email = $this->request->getParam('email'); - // TODO use Mailer::validateMailAddress - if ( !filter_var($email, FILTER_VALIDATE_EMAIL) ) { + if ( !$this->mailer->validateMailAddress($email) ) { return new TemplateResponse('', 'error', array( 'errors' => array(array( 'error' => $this->l10n->t('Email address you entered is not valid'),