diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-02-10 13:43:47 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-02-10 13:43:47 +0000 |
commit | aae033952f5f346db3c012e348dd8c3e0044582e (patch) | |
tree | 9a5b9c79ba121ec855493ffcf9d8ef1146601a21 | |
parent | d6e62eea211f3334e29d32ac38ff3f0cf811ba66 (diff) | |
download | brdo-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.module | 2 |
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. |