// error message in double
This commit is contained in:
@@ -341,9 +341,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
if (!($obj = $this->loadObject(true)))
|
||||
return false;
|
||||
$email = $this->getFieldValue($obj, 'email');
|
||||
if (!Validate::isEmail($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))
|
||||
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('An account already exists for this email address:').' '.$email;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user