Skip to content

Commit

Permalink
removing extra validation for extended username characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwijaya committed Jan 14, 2010
1 parent 0ae9812 commit f406544
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions user/editadvanced_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,10 @@ function validation($usernew, $files) {
//check allowed characters
if ($usernew->username !== moodle_strtolower($usernew->username)) {
$err['username'] = get_string('usernamelowercase');
} else {
if (empty($CFG->extendedusernamechars)) {
$string = clean_param($usernew->username, PARAM_USERNAME);
if ($usernew->username !== $string) {
$err['username'] = get_string('invalidusername');
}
} else {
$string = clean_param($usernew->username, PARAM_USERNAME);
if ($usernew->username !== $string) {
$err['username'] = get_string('invalidusername');
}
}
}
Expand Down

0 comments on commit f406544

Please sign in to comment.