diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-10-17 01:30:10 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-10-31 13:43:23 +0100 |
commit | a2aaba9cab6b7bdf755a023ed2503cf8cf46925a (patch) | |
tree | 04275448599cc8ffaf908b3d7fcc984d822f6a17 /includes/controller/shifts_controller.php | |
parent | d7aea575ff77cd37c326511e7ac5fe49067c63ad (diff) |
User: Bugfixes & code cleanup
Diffstat (limited to 'includes/controller/shifts_controller.php')
-rw-r--r-- | includes/controller/shifts_controller.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php index 07e81957..ee6714d4 100644 --- a/includes/controller/shifts_controller.php +++ b/includes/controller/shifts_controller.php @@ -332,13 +332,12 @@ function shifts_controller() function shift_next_controller() { global $privileges; - $user = auth()->user(); if (!in_array('user_shifts', $privileges)) { redirect(page_link_to('/')); } - $upcoming_shifts = ShiftEntries_upcoming_for_user($user->id); + $upcoming_shifts = ShiftEntries_upcoming_for_user(auth()->user()->id); if (!empty($upcoming_shifts)) { redirect(shift_link($upcoming_shifts[0])); |