Skip to content

A free open source IT asset/license management system

Fixed admin user not showing in download all activity report

snipee8d1093376f0
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,