From bc88867047b431723a46d18aba57a23ab6f6dc4e Mon Sep 17 00:00:00 2001 From: Neil Drumm Date: Tue, 5 Jun 2007 07:41:24 +0000 Subject: [PATCH] - Patch #148974 by hunmonk: fixed whois online block on PostgreSQL. --- modules/user/user.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/user/user.module b/modules/user/user.module index 99aca3a2c614..532c205c9a54 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -588,7 +588,7 @@ function user_block($op = 'list', $delta = 0, $edit = array()) { // Perform database queries to gather online user lists. We use s.timestamp // rather than u.access because it is much faster. $anonymous_count = sess_count($interval); - $authenticated_users = db_query('SELECT DISTINCT u.uid, u.name FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval); + $authenticated_users = db_query('SELECT DISTINCT u.uid, u.name, s.timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval); $authenticated_count = db_num_rows($authenticated_users); // Format the output with proper grammar.