]> git.mjollnir.org Git - moodle.git/commitdiff
Bug fix from Ray Le Couteur ... alphanumeric check was checking old
authormoodler <moodler>
Sat, 15 Mar 2003 08:26:00 +0000 (08:26 +0000)
committermoodler <moodler>
Sat, 15 Mar 2003 08:26:00 +0000 (08:26 +0000)
username but not the new username

user/edit.php

index eaa0e0630177e692b62098683924286ae9de6c37..e2065ed5f28025ef468f8cb98d0d805fd50082e7 100644 (file)
@@ -163,7 +163,7 @@ function find_form_errors(&$user, &$usernew, &$err) {
                 $err["username"] = get_string("usernameexists");
 
         } else {
-            $string = eregi_replace("[^(-\.[:alnum:])]", "", $user->username);
+            $string = eregi_replace("[^(-\.[:alnum:])]", "", $usernew->username);
             if (strcmp($user->username, $string)) 
                 $err["username"] = get_string("alphanumerical");
         }