From 7c6afc2bfe3263b91ecabf5530da57fe1162ea0b Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Wed, 10 Oct 2018 03:10:28 +0200 Subject: Removed `User($id)` function :tada: --- includes/controller/shifts_controller.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'includes/controller/shifts_controller.php') diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php index 5454c648..b56440e5 100644 --- a/includes/controller/shifts_controller.php +++ b/includes/controller/shifts_controller.php @@ -252,7 +252,8 @@ function shift_delete_controller() */ function shift_controller() { - global $user, $privileges; + global $privileges; + $user = auth()->user(); $request = request(); if (!in_array('user_shifts', $privileges)) { @@ -272,7 +273,7 @@ function shift_controller() $shifttype = ShiftType($shift['shifttype_id']); $room = Room($shift['RID']); $angeltypes = AngelTypes(); - $user_shifts = Shifts_by_user($user['UID']); + $user_shifts = Shifts_by_user($user->id); $shift_signup_state = new ShiftSignupState(ShiftSignupState::OCCUPIED, 0); foreach ($angeltypes as &$angeltype) { -- cgit v1.2.3-54-g00ecf