Allow some European characters in the username bug 1249

This commit is contained in:
moodler
2004-04-27 08:24:04 +00:00
parent 5eda8473dc
commit 36c34ab6f6
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ function validate_form($user, &$err) {
if (record_exists("user", "username", $user->username)){
$err->username = get_string("usernameexists");
} else {
$string = eregi_replace("[^(-\.[:alnum:])]", "", $user->username);
$string = eregi_replace("[^(-\.[:alnum:][À-ÖØ-öø-ÿ])]", "", $user->username);
if (strcmp($user->username, $string)) {
$err->username = get_string("alphanumerical");
}
+2 -1
View File
@@ -200,7 +200,8 @@ function find_form_errors(&$user, &$usernew, &$err) {
$err["username"] = get_string("usernameexists");
} else {
$string = eregi_replace("[^(-\.[:alnum:])]", "", $usernew->username);
$string = eregi_replace("[^(-\.[:alnum:][À-ÖØ-öø-ÿ])]", "", $usernew->username);
if (strcmp($usernew->username, $string))
$err["username"] = get_string("alphanumerical");
}