|
|
@ -56,6 +56,12 @@ function validate_data($users, $checkUniqueEmail = false) |
|
|
|
$user['error'] = get_lang('UserNameTooLong'); |
|
|
|
$user['error'] = get_lang('UserNameTooLong'); |
|
|
|
$errors[] = $user; |
|
|
|
$errors[] = $user; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 2.1.1 |
|
|
|
|
|
|
|
$hasDash = strpos($username, '-'); |
|
|
|
|
|
|
|
if ($hasDash !== false) { |
|
|
|
|
|
|
|
$user['error'] = get_lang('UserNameHasDash'); |
|
|
|
|
|
|
|
$errors[] = $user; |
|
|
|
|
|
|
|
} |
|
|
|
// 2.2. Check whether the username was used twice in import file. |
|
|
|
// 2.2. Check whether the username was used twice in import file. |
|
|
|
if (isset($usernames[$user['UserName']])) { |
|
|
|
if (isset($usernames[$user['UserName']])) { |
|
|
|
$user['error'] = get_lang('UserNameUsedTwice'); |
|
|
|
$user['error'] = get_lang('UserNameUsedTwice'); |
|
|
|