// error message in double
This commit is contained in:
1 parent
37f928ade9
commit
252ab56d75
1 file changed
+1
-3
@@ -341,9 +341,7 @@ class AdminEmployeesControllerCore extends AdminController
|
|||||||
if (!($obj = $this->loadObject(true)))
|
if (!($obj = $this->loadObject(true)))
|
||||||
return false;
|
return false;
|
||||||
$email = $this->getFieldValue($obj, 'email');
|
$email = $this->getFieldValue($obj, 'email');
|
||||||
if (!Validate::isEmail($email))
|
if (Validate::isEmail($email) && Employee::employeeExists($email) && (!Tools::getValue('id_employee') || ($employee = new Employee((int)Tools::getValue('id_employee'))) && $employee->email != $email))
|
||||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
|
||||||
elseif (Employee::employeeExists($email) && (!Tools::getValue('id_employee') || ($employee = new Employee((int)Tools::getValue('id_employee'))) && $employee->email != $email))
|
|
||||||
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$email;
|
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user