[-] BO : #PSCFV-1669 - Fix bug with customer add form, when an account already exists with the same email adddress

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14894 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte committed 2012-04-26 08:55:10 +00:00
1 parent c116695e74
commit 9b43f43f21
1 file changed
+4 -5
@@ -715,18 +715,17 @@ class AdminCustomersControllerCore extends AdminController
if (Validate::isEmail($customer_email)) if (Validate::isEmail($customer_email))
$customer->getByEmail($customer_email); $customer->getByEmail($customer_email);
if ($customer->id) if ($customer->id)
$this->errors[] = Tools::displayError('An account already exists for this e-mail address:').' '.$customer_email;
else
{ {
if ($customer = parent::processAdd()) $this->errors[] = Tools::displayError('An account already exists for this e-mail address:').' '.$customer_email;
$this->display = 'edit';
}
elseif ($customer = parent::processAdd())
{ {
$this->context->smarty->assign('new_customer', $customer); $this->context->smarty->assign('new_customer', $customer);
return true; return true;
} }
else
return false; return false;
} }
}
public function processUpdate() public function processUpdate()
{ {