From e98e09150e4852fea3203054d7b60e693506968f Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 5 Sep 2002 02:17:33 +0000 Subject: [PATCH] New error when the admin user is (still) set to the default "admin". --- lang/en/moodle.php | 1 + user/edit.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 49bbc3d287..6f29822feb 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -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"; diff --git a/user/edit.php b/user/edit.php index 85f2d98fe8..505d32aeb3 100644 --- a/user/edit.php +++ b/user/edit.php @@ -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)) -- 2.39.5