samedi 20 août 2016

How to determine how long a Joomla user has been logged in

I'm trying to get one deceptively simple value into a PHP script, within a Joomla (v3.5.1) environment. Basically, I need to know how long a user has been logged in for. Even simpler: How can I find out what time, exactly, the user logged in?

I was looking at the $user object, which does have a lastvisitDate in it, but it doesn't seem to reflect the current login timestamp; instead, that's apparently the previous visit timestamp. Maybe something in the Joomla $session? Any ideas appreciated.

Aucun commentaire:

Enregistrer un commentaire