A related thread

https://groups.google.com/d/msg/web2py/sn2NEu6gVzI/s4ryjVsCYTEJ

Another way would be to do this:

1) Store in memory or disk a set of pairs (auth_user ids, time) on each 
user login, perhaps with the Storage class
2) Creating a login check function that reads the user id, stores it in the 
object of 1) and eliminates entries older than a specified value
3) Put a LOAD("loggedin.load", ... ) ajax call using its timing options in 
the layout view so it updates after seconds/minutes elapsed. The loggedin 
action could return a list of logged in users also to the client.

On Thursday, May 24, 2012 1:26:20 AM UTC-3, IVINH wrote:
>
>
>
> HI,
>
> How can i know the users who are logged in? or number of client online?
> I will use "ram cache" to store information of each request (differentiated 
> by IP or username)?
>
> Thanks for your suggestions.
>
>
>

Reply via email to