Fixed bug in password checking for new admin user ...
This commit is contained in:
+2
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user