From 64674fea2452dfeae7b4eb827c3e08fb3dade6f3 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 17 Oct 2021 09:19:28 +0300 Subject: [PATCH] Add auth check in report --- app/Ninja/Reports/InvoiceReport.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Ninja/Reports/InvoiceReport.php b/app/Ninja/Reports/InvoiceReport.php index 1dce1b17b1b9..10b3d7b87083 100644 --- a/app/Ninja/Reports/InvoiceReport.php +++ b/app/Ninja/Reports/InvoiceReport.php @@ -47,6 +47,10 @@ class InvoiceReport extends AbstractReport public function run() { + if (!Auth::user()) { + return; + } + $account = Auth::user()->account; $statusIds = $this->options['status_ids']; $exportFormat = $this->options['export_format'];