New error when the admin user is (still) set to the default "admin".

This commit is contained in:
martin 2002-09-05 02:17:33 +00:00
parent 403bb50d7b
commit e98e09150e
2 changed files with 4 additions and 0 deletions

View File

@ -372,6 +372,7 @@ $string[undecided] = "Undecided";
$string[unenrol] = "Unenrol";
$string[unenrolme] = "Unenrol me from \$a";
$string[unenrolsure] = "Are you sure you want to unenrol \$a from this course?";
$string[unsafepassword] = "Unsafe password - try something else";
$string[unzip] = "Unzip";
$string[update] = "Update";
$string[updated] = "Updated \$a";

View File

@ -207,6 +207,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"))
$err["newpassword"] = get_string("unsafepassword");
}
if (empty($usernew->email))