diff --git a/user/lib.php b/user/lib.php index a01e6fb6da7..b0717cc38ef 100644 --- a/user/lib.php +++ b/user/lib.php @@ -40,7 +40,7 @@ function user_create_user($user) { } //check username - if ($user->username !== textlib::strtolower($user->username)) { + if ($user->username !== textlib_get_instance()->strtolower($user->username)) { throw new moodle_exception('usernamelowercase'); } else { if ($user->username !== clean_param($user->username, PARAM_USERNAME)) { @@ -91,7 +91,7 @@ function user_update_user($user) { //check username if (isset($user->username)) { - if ($user->username !== textlib::strtolower($user->username)) { + if ($user->username !== textlib_get_instance()->strtolower($user->username)) { throw new moodle_exception('usernamelowercase'); } else { if ($user->username !== clean_param($user->username, PARAM_USERNAME)) {