]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19608 allow forced password change for everybody including admin
authorPetr Skoda <skodak@moodle.org>
Tue, 17 Nov 2009 10:17:25 +0000 (10:17 +0000)
committerPetr Skoda <skodak@moodle.org>
Tue, 17 Nov 2009 10:17:25 +0000 (10:17 +0000)
admin/user/user_bulk_forcepasswordchange.php

index fbaf2aadccff638279ec9aad933fb9d1922eec06..4d75218c50b31504fc0139c08a2ef2d0765cf557 100644 (file)
@@ -29,12 +29,7 @@ if ($confirm and confirm_sesskey()) {
         list($in, $params) = $DB->get_in_or_equal($users);
         if ($rs = $DB->get_recordset_select('user', "id $in", $params)) {
             foreach ($rs as $user) {
-                if ($primaryadmin->id != $user->id and $USER->id != $user->id
-                    and set_user_preference('auth_forcepasswordchange', 1, $user->id)) {
-                    unset($SESSION->bulk_users[$user->id]);
-                } else {
-                    echo $OUTPUT->notification(get_string('forcepasswordchangenot', '', fullname($user, true)));
-                }
+                set_user_preference('auth_forcepasswordchange', 1, $user->id);
             }
             $rs->close();
         }