[-] BO : #PSCFV-1669 - Fix bug with customer add form, when an account already exists with the same email adddress
This commit is contained in:
1 parent
1dc5118140
commit
740fb1283e
1 file changed
+8
-9
@@ -715,17 +715,16 @@ 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';
|
||||||
$this->context->smarty->assign('new_customer', $customer);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
elseif ($customer = parent::processAdd())
|
||||||
|
{
|
||||||
|
$this->context->smarty->assign('new_customer', $customer);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function processUpdate()
|
public function processUpdate()
|
||||||
|
|||||||
Reference in new issue
Block a user