They use the same method, but with a much longer logout delay -- such as ten or fifteen minutes. If the user hasn't requested another page within that time, they're said to be inactive.
Printable View
They use the same method, but with a much longer logout delay -- such as ten or fifteen minutes. If the user hasn't requested another page within that time, they're said to be inactive.
Right but theres no frames that refresh and reset the users lastseen, so on every page, the users lastseen is updated, and then at the same time their time is checked against now. So no matter what they're considered always online. How do you make it so that they're logged off after 15 minutes of not going to a different page?
Sorry if my question makes no sense.
You have to check their time against now whenever another user accesses a page as well, not just when they do. Basically, every time a page is requested by anyone, member, guest, whatever, you have to go through a list of the users considered online, check their lastseen against now, and update their status appropriately.Quote:
the users lastseen is updated, and then at the same time their time is checked against now.
OHHHHH!
I get it now hahaha.
Allright well how would i check one user's time when a different user accesses a page? Do i check every single users Lastseen against NOW() everytime a page is accessed?
That would make sense to me. :p
You only need to check the users that are logged in, and obviously there's no need to check the user who made the request, as you've pointed out above.Quote:
Do i check every single users Lastseen against NOW() everytime a page is accessed?
Right.
Well, awesome, i finally get it!
Thanks Twey. :D