summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorShevAbam <shevabam@gmail.com>2014-11-11 17:05:49 +0100
committerShevAbam <shevabam@gmail.com>2014-11-11 17:05:49 +0100
commitf71fb5bfc125171a9c170f4f1cec5b8ba601eaf0 (patch)
treefb638a3d0ffb4800ee38fa04dead91b78a6ae8f0 /libs
parentf6a714596ec36cb7109c785d2b5d5a888af45dd8 (diff)
Fix on retreive users connected on system block
Diffstat (limited to 'libs')
-rw-r--r--libs/system.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/libs/system.php b/libs/system.php
index 62ca9cc..49232ef 100644
--- a/libs/system.php
+++ b/libs/system.php
@@ -59,15 +59,10 @@ else
}
// Current users
-if (!($current_users_cmd = shell_exec('who -q')))
+if (!($current_users = shell_exec('who -u | awk \'{ print $1 }\' | wc -l')))
{
$current_users = 'N.A';
}
-else
-{
- $arr_user = explode('=', $current_users_cmd);
- $current_users = $arr_user[1];
-}
// Server datetime
if (!($server_date = shell_exec('/bin/date')))