diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-10-10 03:10:28 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-10-31 13:43:23 +0100 |
commit | 7c6afc2bfe3263b91ecabf5530da57fe1162ea0b (patch) | |
tree | a251a646b6399a65842e3bfaefe44954f5ac1770 /includes/controller/shifts_controller.php | |
parent | 89e62c95a7ffd71a8e860f59378ecd13d6cbb196 (diff) |
Removed `User($id)` function :tada:
Diffstat (limited to 'includes/controller/shifts_controller.php')
-rw-r--r-- | includes/controller/shifts_controller.php | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |