]> git.mjollnir.org Git - moodle.git/commitdiff
New error when the admin user is (still) set to the default "admin".
authormartin <martin>
Thu, 5 Sep 2002 02:17:33 +0000 (02:17 +0000)
committermartin <martin>
Thu, 5 Sep 2002 02:17:33 +0000 (02:17 +0000)
lang/en/moodle.php
user/edit.php

index 49bbc3d287462f50a6452317f82d282efc399ef7..6f29822febb97230db99251af36f2d5e583e30b8 100644 (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";
index 85f2d98fe86c6547c2afbad75acf6c236afdf906..505d32aeb397e1395194956288e957df1d41cd50 100644 (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))