all MDL-20821 Removed ereg related deprecated functions
This commit is contained in:
@@ -260,7 +260,7 @@ if ($formdata = $mform->is_cancelled()) {
|
||||
// normalize username
|
||||
$user->username = $textlib->strtolower($user->username);
|
||||
if (empty($CFG->extendedusernamechars)) {
|
||||
$user->username = eregi_replace('[^(-\.[:alnum:])]', '', $user->username);
|
||||
$user->username = preg_replace('/[^(-\.[:alnum:])]/i', '', $user->username);
|
||||
}
|
||||
if (empty($user->username)) {
|
||||
$upt->track('status', get_string('missingfield', 'error', 'username'), 'error');
|
||||
|
||||
Reference in New Issue
Block a user