Details
Description
blocks/online_users/block_online_users.php - line:119
This SQL query would always return 1 (number of instances the first userid in the returned SQL)
$usercount = count_records_sql("SELECT COUNT(u.id), u.id $from $where GROUP BY u.id");
The patch counts the distinct userids to correctly return the real userc ount. :-
$usercount = count_records_sql("SELECT COUNT(DISTINCT(u.id)) $from $where");
+1 for this issue.
When viewing the Online Users block, it always says 1 user is online:
(last 5 minutes: 1)
But actually there are several hundred users online.
Tim's patch above fixes the count.