// improve authentification.tpl code, in order to display errors messages.

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11414 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mBertholino
2011-12-20 14:39:27 +00:00
parent 3527399c24
commit 49a1282cfb
2 changed files with 32 additions and 1 deletions
+4 -1
View File
@@ -328,6 +328,8 @@ class AuthControllerCore extends FrontController
);
die(Tools::jsonEncode($return));
}
else
$this->context->smarty->assign('authentification_error', $this->errors);
}
/**
@@ -349,7 +351,7 @@ class AuthControllerCore extends FrontController
if (!Validate::isEmail($email = Tools::getValue('email')) || empty($email))
$this->errors[] = Tools::displayError('Invalid e-mail address');
elseif (Customer::customerExists($email))
$this->errors[] = Tools::displayError('An account is already registered with this e-mail, please fill in the password or request a new one.');
$this->errors[] = Tools::displayError('An account is already registered with this e-mail.');
// Preparing customer
$customer = new Customer();
$_POST['lastname'] = Tools::getValue('customer_lastname');
@@ -580,6 +582,7 @@ class AuthControllerCore extends FrontController
);
die(Tools::jsonEncode($return));
}
$this->context->smarty->assign('account_error', $this->errors);
}
}