summaryrefslogtreecommitdiff
path: root/includes/controller/shifts_controller.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-10-17 01:30:10 +0200
committermsquare <msquare@notrademark.de>2018-10-31 13:43:23 +0100
commita2aaba9cab6b7bdf755a023ed2503cf8cf46925a (patch)
tree04275448599cc8ffaf908b3d7fcc984d822f6a17 /includes/controller/shifts_controller.php
parentd7aea575ff77cd37c326511e7ac5fe49067c63ad (diff)
User: Bugfixes & code cleanup
Diffstat (limited to 'includes/controller/shifts_controller.php')
-rw-r--r--includes/controller/shifts_controller.php3
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]));