Skip to content
Browse files

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

  • Loading branch information...
1 parent 403bb50 commit e98e09150e4852fea3203054d7b60e693506968f martin committed
Showing with 4 additions and 0 deletions.
  1. +1 −0 lang/en/moodle.php
  2. +3 −0 user/edit.php
View
1 lang/en/moodle.php
@@ -372,6 +372,7 @@
$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
3 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))

0 comments on commit e98e091

Please sign in to comment.
Something went wrong with that request. Please try again.