From: Rossiani Wijaya <rossianiwijaya@gmail.com> Date: Wed, 13 Jan 2010 09:33:08 +0000 (+0000) Subject: MDL-16919 removing extra validation for extended username characters. PARAM_USERNAME... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7960422510562d5cdc51a6996ed7d10e76770028;p=moodle.git MDL-16919 removing extra validation for extended username characters. PARAM_USERNAME always check the value for extended chars. --- diff --git a/login/index.php b/login/index.php index 0ee8371e41..c5c97d9146 100644 --- a/login/index.php +++ b/login/index.php @@ -104,12 +104,11 @@ if (empty($CFG->usesid) and $testcookies and (get_moodle_cookie() == '')) { / $frm->username = trim(moodle_strtolower($frm->username)); - if (is_enabled_auth('none') && empty($CFG->extendedusernamechars)) { + if (is_enabled_auth('none') ) { $string = clean_param($frm->username, PARAM_USERNAME); if (strcmp($frm->username, $string)) { $errormsg = get_string('username').': '.get_string("invalidusername"); $errorcode = 2; - $user = null; } } diff --git a/login/signup_form.php b/login/signup_form.php index 2ce7ebbc55..0e7b03ee2e 100644 --- a/login/signup_form.php +++ b/login/signup_form.php @@ -103,13 +103,12 @@ class login_signup_form extends moodleform { //check allowed characters if ($data['username'] !== moodle_strtolower($data['username'])) { $errors['username'] = get_string('usernamelowercase'); - } else { - if (empty($CFG->extendedusernamechars)) { - $string = clean_param($data['username'], PARAM_USERNAME); - if (strcmp($data['username'], $string)) { - $errors['username'] = get_string('invalidusername'); - } + } else { + $string = clean_param($data['username'], PARAM_USERNAME); + if (strcmp($data['username'], $string)) { + $errors['username'] = get_string('invalidusername'); } + } }