summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-02-10 13:43:47 +0000
committerDries Buytaert <dries@buytaert.net>2007-02-10 13:43:47 +0000
commitaae033952f5f346db3c012e348dd8c3e0044582e (patch)
tree9a5b9c79ba121ec855493ffcf9d8ef1146601a21
parentd6e62eea211f3334e29d32ac38ff3f0cf811ba66 (diff)
downloadbrdo-aae033952f5f346db3c012e348dd8c3e0044582e.tar.gz
brdo-aae033952f5f346db3c012e348dd8c3e0044582e.tar.bz2
- Patch #107051 by webchick: duplicate user names in who is online block
-rw-r--r--modules/user/user.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index d7e5ad56b..c4d52b081 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -585,7 +585,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 is much faster..
$anonymous_count = sess_count($interval);
- $authenticated_users = db_query('SELECT 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 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.