Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Sep 2006 at 02:20 UTC
Updated:
11 Dec 2006 at 21:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
davemicc commentedI found the problem.
The way the code was doing it was by finding the timestamp of the beginning of the period a user had to have accessed something to count them online. Then, it treated this timestamp like the number of seconds users would be counted online. Essentially, all users that had accessed something since 1970 must've been counted online.
This patch seems to fix the problem.
Comment #2
davemicc commentedThe block still sometimes contradicts itself. If a user logs out of an authenticated session they will still display on the "online users" list for another 15 minutes.
If we change the code to use an inner join against the sessions table when we select the recently active users from the users table I think we can achieve better results. I don't know how much slower this query is.
Comment #3
davemicc commentedAdded table specification to ORDER BY clause in query.
Comment #4
Gurpartap Singh commentedThis seems already fixed in Drupal 5.x HEAD version. Not sure this kind of update will go into Drupal 4.7.x branch.
Comment #5
davemicc commentedYes, it seems to have been fixed in issue #93042. Almost the same as my last patch except their code is supposed to be a little faster.
Comment #6
(not verified) commented