function user_import_usernames_invalid in User Import 5
Same name and namespace in other branches
- 5.2 user_import.module \user_import_usernames_invalid()
2 calls to user_import_usernames_invalid()
- user_import_configure_form in ./
user_import.module - Configuration form define (settings affect all user imports)
- user_import_configure_form_submit in ./
user_import.module
File
- ./
user_import.module, line 1524 - Import users from a comma separated file (csv).
Code
function user_import_usernames_invalid($delete = NULL) {
$users = db_query("SELECT uid, name, mail from {users} WHERE uid != 0 AND uid != 1");
while ($user = db_fetch_object($users)) {
$error = user_validate_name($user->name);
if (!empty($error)) {
$errors[$user->uid]['uid'] = $user->uid;
$errors[$user->uid]['mail'] = $user->mail;
$errors[$user->uid]['name'] = $user->name;
$errors[$user->uid]['error'] = $error;
if (!empty($delete)) {
$form_values['account'] = $user;
user_confirm_delete_submit($form_id, $form_values);
}
}
}
$output = theme('user_import_username_errors', $errors);
return $output;
}