aboutsummaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/last_login.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/last_login.php b/libs/last_login.php
index 4596e44..4a3c8f8 100644
--- a/libs/last_login.php
+++ b/libs/last_login.php
@@ -7,7 +7,7 @@ $datas = array();
if ($Config->get('last_login:enable'))
{
- if (!(exec('/usr/bin/lastlog --time 365 | /usr/bin/awk -F\' \' \'{ print $1";"$5, $4, $8, $6}\'', $users)))
+ if (!(exec('/usr/bin/lastlog --time 365 | awk \'{ printf $1";"; for (i=4; i<NF; i++) printf $i" "; print $NF; }\'', $users)))
{
$datas[] = array(
'user' => 'N.A',
@@ -30,4 +30,4 @@ if ($Config->get('last_login:enable'))
}
}
-echo json_encode($datas); \ No newline at end of file
+echo json_encode($datas);