]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed bug in password checking for new admin user ...
authormartin <martin>
Thu, 5 Sep 2002 17:31:08 +0000 (17:31 +0000)
committermartin <martin>
Thu, 5 Sep 2002 17:31:08 +0000 (17:31 +0000)
user/edit.php

index 505d32aeb397e1395194956288e957df1d41cd50..f4365de4c5e65355c03e2150f0e3f97042b7fa0d 100644 (file)
@@ -208,8 +208,9 @@ function find_form_errors(&$user, &$usernew, &$err) {
         if (empty($usernew->newpassword) and empty($user->password))
             $err["newpassword"] = get_string("missingpassword");
 
-        if ($usernew->newpassword == md5("admin") or $user->password == md5("admin"))
+        if (($usernew->newpassword == "admin") or ($user->password == md5("admin") and empty($usernew->newpassword)) ) {
             $err["newpassword"] = get_string("unsafepassword");
+        }
     }
 
     if (empty($usernew->email))