From 88f3bafa5e41217b5a7dd49271429099515de9c8 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Wed, 31 Oct 2018 12:48:22 +0100 Subject: [PATCH] Replaced `Auth()` with `auth()` --- includes/controller/shift_entries_controller.php | 2 +- includes/controller/user_driver_licenses_controller.php | 4 ++-- includes/controller/users_controller.php | 2 +- includes/helper/email_helper.php | 2 +- includes/model/Message_model.php | 2 +- includes/model/Shifts_model.php | 2 +- includes/model/UserWorkLog_model.php | 2 +- includes/pages/admin_import.php | 2 +- includes/pages/admin_news.php | 2 +- includes/pages/admin_questions.php | 2 +- includes/pages/admin_user.php | 2 +- includes/pages/guest_login.php | 2 +- includes/pages/user_messages.php | 2 +- includes/pages/user_news.php | 4 ++-- includes/pages/user_questions.php | 2 +- includes/pages/user_shifts.php | 4 ++-- includes/sys_menu.php | 2 +- includes/view/Rooms_view.php | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php index c5c1e181..95fbccfc 100644 --- a/includes/controller/shift_entries_controller.php +++ b/includes/controller/shift_entries_controller.php @@ -334,7 +334,7 @@ function shift_entry_load() */ function shift_entry_delete_controller() { - $user = Auth()->user(); + $user = auth()->user(); $request = request(); $shiftEntry = shift_entry_load(); diff --git a/includes/controller/user_driver_licenses_controller.php b/includes/controller/user_driver_licenses_controller.php index 9c44adb5..dd12db2a 100644 --- a/includes/controller/user_driver_licenses_controller.php +++ b/includes/controller/user_driver_licenses_controller.php @@ -39,7 +39,7 @@ function user_driver_license_required_hint() */ function user_driver_licenses_controller() { - $user = Auth()->user(); + $user = auth()->user(); if (!$user) { redirect(page_link_to('')); @@ -97,7 +97,7 @@ function user_driver_license_load_user() function user_driver_license_edit_controller() { global $privileges; - $user = Auth()->user(); + $user = auth()->user(); $request = request(); $user_source = user_driver_license_load_user(); diff --git a/includes/controller/users_controller.php b/includes/controller/users_controller.php index b54bc967..0bf612d5 100644 --- a/includes/controller/users_controller.php +++ b/includes/controller/users_controller.php @@ -14,7 +14,7 @@ use Engelsystem\ShiftsFilter; */ function users_controller() { - $user = Auth()->user(); + $user = auth()->user(); $request = request(); if (!$user) { diff --git a/includes/helper/email_helper.php b/includes/helper/email_helper.php index 566217ef..b5a4060d 100644 --- a/includes/helper/email_helper.php +++ b/includes/helper/email_helper.php @@ -12,7 +12,7 @@ use Engelsystem\Models\User\User; */ function engelsystem_email_to_user($recipientUser, $title, $message, $notIfItsMe = false) { - if ($notIfItsMe && Auth()->user()->id == $recipientUser->id) { + if ($notIfItsMe && auth()->user()->id == $recipientUser->id) { return true; } diff --git a/includes/model/Message_model.php b/includes/model/Message_model.php index 26f7e599..a438a8c5 100644 --- a/includes/model/Message_model.php +++ b/includes/model/Message_model.php @@ -35,7 +35,7 @@ function Message($message_id) */ function Message_send($receiver_user_id, $text) { - $user = Auth()->user(); + $user = auth()->user(); $text = preg_replace("/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui", '', strip_tags($text)); $receiver_user_id = preg_replace('/([^\d]{1,})/ui', '', strip_tags($receiver_user_id)); diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index cc909954..d6fbe3b6 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -519,7 +519,7 @@ function Shift_delete($shift_id) */ function Shift_update($shift) { - $user = Auth()->user(); + $user = auth()->user(); $shift['name'] = ShiftType($shift['shifttype_id'])['name']; mail_shift_change(Shift($shift['SID']), $shift); diff --git a/includes/model/UserWorkLog_model.php b/includes/model/UserWorkLog_model.php index 11f60901..2b87c040 100644 --- a/includes/model/UserWorkLog_model.php +++ b/includes/model/UserWorkLog_model.php @@ -94,7 +94,7 @@ function UserWorkLog_update($userWorkLog) */ function UserWorkLog_create($userWorkLog) { - $user = Auth()->user(); + $user = auth()->user(); $user_source = User::find($userWorkLog['user_id']); diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php index f6889320..3ca9cb65 100644 --- a/includes/pages/admin_import.php +++ b/includes/pages/admin_import.php @@ -14,7 +14,7 @@ function admin_import_title() function admin_import() { global $rooms_import; - $user = Auth()->user(); + $user = auth()->user(); $html = ''; $import_dir = __DIR__ . '/../../import'; $request = request(); diff --git a/includes/pages/admin_news.php b/includes/pages/admin_news.php index 2e951dde..90aeb439 100644 --- a/includes/pages/admin_news.php +++ b/includes/pages/admin_news.php @@ -9,7 +9,7 @@ use Engelsystem\Models\User\User; function admin_news() { global $privileges; - $user = Auth()->user(); + $user = auth()->user(); $request = request(); if (!$request->has('action')) { diff --git a/includes/pages/admin_questions.php b/includes/pages/admin_questions.php index 85d62362..4f0f0bfc 100644 --- a/includes/pages/admin_questions.php +++ b/includes/pages/admin_questions.php @@ -40,7 +40,7 @@ function admin_new_questions() */ function admin_questions() { - $user = Auth()->user(); + $user = auth()->user(); $request = request(); if (!$request->has('action')) { diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index a87a76cf..3e3722be 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -17,7 +17,7 @@ function admin_user_title() function admin_user() { global $privileges; - $user = Auth()->user(); + $user = auth()->user(); $tshirt_sizes = config('tshirt_sizes'); $request = request(); $html = ''; diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index 5efe4521..a47f6013 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -40,7 +40,7 @@ function logout_title() function guest_register() { global $privileges; - $authUser = Auth()->user(); + $authUser = auth()->user(); $tshirt_sizes = config('tshirt_sizes'); $enable_tshirt_size = config('enable_tshirt_size'); $min_password_length = config('min_password_length'); diff --git a/includes/pages/user_messages.php b/includes/pages/user_messages.php index 9b587343..0ac554b8 100644 --- a/includes/pages/user_messages.php +++ b/includes/pages/user_messages.php @@ -16,7 +16,7 @@ function messages_title() */ function user_unread_messages() { - $user = Auth()->user(); + $user = auth()->user(); if ($user) { $new_messages = count(DB::select( diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index 266018a0..d7e681a6 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -131,7 +131,7 @@ function display_news($news) */ function user_news_comments() { - $user = Auth()->user(); + $user = auth()->user(); $request = request(); $html = '

' . user_news_comments_title() . '

'; @@ -199,7 +199,7 @@ function user_news_comments() function user_news() { global $privileges; - $user = Auth()->user(); + $user = auth()->user(); $display_news = config('display_news'); $request = request(); diff --git a/includes/pages/user_questions.php b/includes/pages/user_questions.php index c269dbb1..9027ada7 100644 --- a/includes/pages/user_questions.php +++ b/includes/pages/user_questions.php @@ -16,7 +16,7 @@ function questions_title() */ function user_questions() { - $user = Auth()->user(); + $user = auth()->user(); $request = request(); if (!$request->has('action')) { diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 3e300e3c..cef6af73 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -128,7 +128,7 @@ function load_days() */ function load_types() { - $user = Auth()->user(); + $user = auth()->user(); if (!count(DB::select('SELECT `id`, `name` FROM `AngelTypes` WHERE `restricted` = 0'))) { error(__('The administration has not configured any angeltypes yet - or you are not subscribed to any angeltype.')); @@ -284,7 +284,7 @@ function view_user_shifts() */ function ical_hint() { - $user = Auth()->user(); + $user = auth()->user(); return heading(__('iCal export'), 2) . '

' . sprintf( diff --git a/includes/sys_menu.php b/includes/sys_menu.php index dfc5c424..e4f79766 100644 --- a/includes/sys_menu.php +++ b/includes/sys_menu.php @@ -20,7 +20,7 @@ function page_link_to($page = '', $parameters = []) */ function header_render_hints() { - $user = Auth()->user(); + $user = auth()->user(); $hints_renderer = new UserHintsRenderer(); diff --git a/includes/view/Rooms_view.php b/includes/view/Rooms_view.php index 0a2286fb..93351e28 100644 --- a/includes/view/Rooms_view.php +++ b/includes/view/Rooms_view.php @@ -12,7 +12,7 @@ use Engelsystem\ShiftsFilterRenderer; */ function Room_view($room, ShiftsFilterRenderer $shiftsFilterRenderer, ShiftCalendarRenderer $shiftCalendarRenderer) { - $user = Auth()->user(); + $user = auth()->user(); $assignNotice = ''; if (config('signup_requires_arrival') && !$user->state->arrived) {