]> git.mjollnir.org Git - moodle.git/commitdiff
Allow some European characters in the username bug 1249
authormoodler <moodler>
Tue, 27 Apr 2004 08:24:04 +0000 (08:24 +0000)
committermoodler <moodler>
Tue, 27 Apr 2004 08:24:04 +0000 (08:24 +0000)
login/signup.php
user/edit.php

index c5a740be29997c38052c211222ed2a973e68944c..8842d6bd43152626f963dab463b0ec688c56bb9e 100644 (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");
             }
index d9ecb27da595eae6695a715812056db30ad16c6b..4c3858ce65c75fd8c479f18e1a37a21ae2ca995f 100644 (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");
         }