From 04ef7b163651c1e3841e683e08fae097673d7bb3 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 13 Sep 2004 09:00:27 +0000 Subject: - Patch #10777 by ccourtne: performance improvement: the user module executes a query and never uses the results. --- modules/user/user.module | 3 --- 1 file changed, 3 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index a62ccab94..c745ebd00 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -510,9 +510,6 @@ function user_block($op = 'list', $delta = 0) { $users = db_query('SELECT DISTINCT(uid), MAX(timestamp) AS max_timestamp FROM {sessions} WHERE timestamp >= %d AND uid != 0 GROUP BY uid ORDER BY max_timestamp DESC', time() - $time_period ); $total_users = db_num_rows($users); - // Perform database queries to count all users - $all_users = db_fetch_object(db_query('SELECT COUNT(uid) AS count FROM {users} WHERE uid != 0 AND status != 0')); - // Format the output with proper grammar. if ($total_users == 1 && $guests->count == 1) { $output = t('There is currently %members and %visitors online.', array('%members' => format_plural($total_users, '1 user', '%count users'), '%visitors' => format_plural($guests->count, '1 guest', '%count guests'))); -- cgit v1.2.3