From 89e62c95a7ffd71a8e860f59378ecd13d6cbb196 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 9 Oct 2018 21:47:31 +0200 Subject: Changed more functions :tada: --- includes/pages/user_myshifts.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'includes/pages/user_myshifts.php') diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index 2a8a5d5a..ab4b00b6 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -1,6 +1,7 @@ has('reset')) { if ($request->input('reset') == 'ack') { User_reset_api_key($user); success(__('Key changed.')); - redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user['UID']])); + redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user->id])); } return page_with_title(__('Reset API key'), [ error( @@ -68,7 +69,7 @@ function user_myshifts() ', [ $shift_entry_id, - $shifts_user['UID'], + $shifts_user->id, ] ); if (!empty($shift)) { @@ -87,7 +88,7 @@ function user_myshifts() } $comment = strip_request_item_nl('comment'); - $user_source = User($shift['UID']); + $user_source = User::find($shift['UID']); if ($valid) { ShiftEntry_update([ @@ -105,7 +106,7 @@ function user_myshifts() . '. Freeloaded: ' . ($freeloaded ? 'YES Comment: ' . $freeload_comment : 'NO') ); success(__('Shift saved.')); - redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user['UID']])); + redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user->id])); } } @@ -125,6 +126,6 @@ function user_myshifts() } } - redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user['UID']])); + redirect(page_link_to('users', ['action' => 'view', 'user_id' => $shifts_user->id])); return ''; } -- cgit v1.2.3-54-g00ecf