From 9daf3766a42243b322cd076eef7ac493ca88b738 Mon Sep 17 00:00:00 2001 From: Mohammad Shokri Date: Sat, 28 Sep 2013 13:23:10 +0330 Subject: [PATCH] Add table_prefix to registered_users query --- plugins/drupal/drupal_users_online.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/drupal/drupal_users_online.php b/plugins/drupal/drupal_users_online.php index 9eafa167..3d9f719a 100755 --- a/plugins/drupal/drupal_users_online.php +++ b/plugins/drupal/drupal_users_online.php @@ -114,7 +114,7 @@ function get_online_registered_users(&$dbh = NULL, $active_interval = 900) { $table_prefix = getenv('table_prefix'); - $sql = "SELECT COUNT(DISTINCT(uid)) AS count FROM sessions WHERE uid != 0 + $sql = "SELECT COUNT(DISTINCT(uid)) AS count FROM {$table_prefix}sessions WHERE uid != 0 AND timestamp >= (UNIX_TIMESTAMP(now()) - ?)"; $stmt = $dbh->prepare($sql);