Reputation: 361
I add to table sfGuardUser new fields - is_online. If user login on my site then i set this field on TRUE. if he logout then i set FALSE, but how to set FALSE if lifetime session for these user expired?
Upvotes: 0
Views: 266
Reputation: 7887
i think is better to create a field on the sf_guard_user table where you set the last activity date. everytime the user reload the page, you have to set this date with the current_timestamp.
now you can check with a date_diff the users login state!
Upvotes: 3