Allow some European characters in the username bug 1249
This commit is contained in:
+1
-1
@@ -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
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user