if ($context = get_context_instance($contextlevel, $instanceid)) {
return delete_records('context', 'id', $context->id) &&
delete_records('role_assignments', 'contextid', $context->id) &&
- delete_records('role_role_capabilities', 'contextid', $context->id);
+ delete_records('role_capabilities', 'contextid', $context->id);
}
return true;
}
if (!empty($USER->id) && $USER->id == $userid) {
load_user_capability();
}
-
+
/// Ask all the modules if anything needs to be done for this user
if ($mods = get_list_of_plugins('mod')) {
foreach ($mods as $mod) {