From 6726e9076ca659b4be74118cdb2b49ef56aa317c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 16 Apr 2020 12:32:26 +0200 Subject: [statistics] Show current user in client list --- modules-available/statistics/pages/list.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules-available/statistics/pages/list.inc.php') diff --git a/modules-available/statistics/pages/list.inc.php b/modules-available/statistics/pages/list.inc.php index e2e7ff09..97133aa2 100644 --- a/modules-available/statistics/pages/list.inc.php +++ b/modules-available/statistics/pages/list.inc.php @@ -46,7 +46,7 @@ class SubPage } } $res = Database::simpleQuery("SELECT m.machineuuid, m.locationid, m.macaddr, m.clientip, m.lastseen, - m.logintime, m.state, m.realcores, m.mbram, m.kvmstate, m.cpumodel, m.id44mb, m.hostname, m.notes IS NOT NULL AS hasnotes, + m.logintime, m.state, m.currentuser, m.realcores, m.mbram, m.kvmstate, m.cpumodel, m.id44mb, m.hostname, m.notes IS NOT NULL AS hasnotes, m.badsectors, Count(s.machineuuid) AS confvars $xtra FROM machine m LEFT JOIN setting_machine s USING (machineuuid) $join WHERE $where GROUP BY m.machineuuid $sort", $args); @@ -102,6 +102,9 @@ class SubPage if (!$row['isclient'] && $row['state'] === 'IDLE') { $row['state'] = 'OCCUPIED'; } + if (!$row['isclient']) { + unset($row['currentuser']); + } } $row['state_' . $row['state']] = true; $row['locationname'] = Location::getName($row['locationid']); -- cgit v1.2.3-55-g7522