MDL-19608 allow forced password change for everybody including admin
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user