[rt-devel] Listing logged-in users

Thomas Sibley trs at bestpractical.com
Mon Nov 26 15:28:50 EST 2012

On 11/23/2012 10:11 AM, Michele Bergonzoni wrote:
> Am I missing something, or should I conclude that this is impossible
> given the way web sessions work in general and in RT in particular?

It's not possible with just the session data because web sessions aren't
stateful.  You only get them on a request, so the best you can do is
update a cache of recently seen users (using one of the /autohandler
callbacks, which are invoked by RT::Interface::Web::HandleRequest for
every request).  Your "Who is logged in now" then uses the recently seen
users to show "who accessed RT in the past X minutes" where X is
something appropriate for your usage like 5 or 30.

More information about the rt-devel mailing list