all MDL-20821 Removed ereg related deprecated functions

This commit is contained in:
Andrew Davis
2009-11-18 07:36:20 +00:00
parent 4dadad0869
commit 76561f1e4e
70 changed files with 1393 additions and 310 deletions
+1 -1
View File
@@ -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');