From e8d1093376f0db5fb72328dd4972e46f0db2804a Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 15 Nov 2024 18:51:45 +0000 Subject: [PATCH] Fixed admin user not showing in download all activity report Signed-off-by: snipe --- app/Http/Controllers/ReportsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 105dac6350..0d4bb936b2 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -259,7 +259,7 @@ class ReportsController extends Controller $executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']; Log::debug('Added headers: '.$executionTime); - $actionlogs = Actionlog::with('item', 'user', 'target', 'location') + $actionlogs = Actionlog::with('item', 'user', 'target', 'location', 'adminuser') ->orderBy('created_at', 'DESC') ->chunk(20, function ($actionlogs) use ($handle) { $executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']; @@ -286,7 +286,7 @@ class ReportsController extends Controller $row = [ $actionlog->created_at, - ($actionlog->admin) ? e($actionlog->admin->getFullNameAttribute()) : '', + ($actionlog->adminuser) ? e($actionlog->adminuser->getFullNameAttribute()) : '', $actionlog->present()->actionType(), e($actionlog->itemType()), ($actionlog->itemType() == 'user') ? $actionlog->filename : $item_name,