|
|
|
@ -131,7 +131,7 @@ function validate_data($users, $checkUniqueEmail = false) |
|
|
|
if (api_get_setting('registration', 'email') === 'false' && empty($user['Email'])) { |
|
|
|
if (api_get_setting('registration', 'email') === 'false' && empty($user['Email'])) { |
|
|
|
$user['Email'] = ''; |
|
|
|
$user['Email'] = ''; |
|
|
|
} |
|
|
|
} |
|
|
|
if (isset($user['Email'])) { |
|
|
|
if (!empty($user['Email'])) { |
|
|
|
$result = api_valid_email($user['Email']); |
|
|
|
$result = api_valid_email($user['Email']); |
|
|
|
if ($result === false) { |
|
|
|
if ($result === false) { |
|
|
|
$user['message'] .= Display::return_message(get_lang('PleaseEnterValidEmail'), 'warning'); |
|
|
|
$user['message'] .= Display::return_message(get_lang('PleaseEnterValidEmail'), 'warning'); |
|
|
|
@ -140,7 +140,7 @@ function validate_data($users, $checkUniqueEmail = false) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($checkUniqueEmail) { |
|
|
|
if ($checkUniqueEmail) { |
|
|
|
if (isset($user['Email'])) { |
|
|
|
if (!empty($user['Email'])) { |
|
|
|
$userFromEmail = api_get_user_info_from_email($user['Email']); |
|
|
|
$userFromEmail = api_get_user_info_from_email($user['Email']); |
|
|
|
if (!empty($userFromEmail)) { |
|
|
|
if (!empty($userFromEmail)) { |
|
|
|
$user['message'] .= Display::return_message(get_lang('EmailUsedTwice'), 'warning'); |
|
|
|
$user['message'] .= Display::return_message(get_lang('EmailUsedTwice'), 'warning'); |
|
|
|
|