233
225
$form->set_error('file', get_string('uploadcsverrorinvalidusername', 'admin', $i));
228
if (record_exists_select('usr', 'LOWER(username) = ?', strtolower($username)) || isset($usernames[strtolower($username)])) {
237
229
$form->set_error('file', get_string('uploadcsverroruseralreadyexists', 'admin', $i, $username));
241
233
$form->set_error('file', get_string('uploadcsverroremailaddresstaken', 'admin', $i, $email));