Update# use IMailer to validate email address
This commit is contained in:
parent
672bf30ee6
commit
5131b2b2ac
|
|
@ -64,8 +64,7 @@ class RegisterController extends Controller {
|
||||||
*/
|
*/
|
||||||
public function validateEmail() {
|
public function validateEmail() {
|
||||||
$email = $this->request->getParam('email');
|
$email = $this->request->getParam('email');
|
||||||
// TODO use Mailer::validateMailAddress
|
if ( !$this->mailer->validateMailAddress($email) ) {
|
||||||
if ( !filter_var($email, FILTER_VALIDATE_EMAIL) ) {
|
|
||||||
return new TemplateResponse('', 'error', array(
|
return new TemplateResponse('', 'error', array(
|
||||||
'errors' => array(array(
|
'errors' => array(array(
|
||||||
'error' => $this->l10n->t('Email address you entered is not valid'),
|
'error' => $this->l10n->t('Email address you entered is not valid'),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue