MDL-19608 allow forced password change for everybody including admin

This commit is contained in:
Petr Skoda
2009-11-17 10:17:25 +00:00
parent 23c442988d
commit 6b16433a81
+1 -6
View 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();
}