diff --git a/lbplanner/services/slots/remove_slot_supervisor.php b/lbplanner/services/slots/remove_slot_supervisor.php index 91e0caa5..82427f67 100644 --- a/lbplanner/services/slots/remove_slot_supervisor.php +++ b/lbplanner/services/slots/remove_slot_supervisor.php @@ -68,11 +68,11 @@ public static function remove_slot_supervisor(int $userid, int $slotid): void { ); // Check if current user is supervisor for this slot, throw error if not. - slot_helper::assert_slot_supervisor($USER->id, $slotid); + slot_helper::assert_slot_supervisor(intval($USER->id), $slotid); $DB->delete_records( slot_helper::TABLE_SUPERVISORS, - ['id' => $userid, 'slotid' => $slotid] + ['userid' => $userid, 'slotid' => $slotid] ); }