I frequently want to check if a particular set of users are currently logged into the back end (administrator side) of my site (e.g. so I don't do anything disruptive while they are logged in) and, less importantly, how long they were logged into my site during each session when they were logged in (e.g. so I know how much time my employees are spending logged into my site).
Using Users->User Actions Log I can see when everyone logged in but I can't see when they logged out, either manually or due to an inactivity timer expiration. Is there a way to add the user logout time to the User Actions Log or some other software that tracks users login/logout times? I'm on Joomla 3.9.28.
What I really want to know about is users logging in/out of the back end (admin side) of the site, I really don't care about users logging into the front end and so hadn't initially considered that the current Actions Log includes both front and back end logins. I realized that when I found this plugin*:
https://help.joomlatools.com/article/313-configuring-logman#user-login-logout
which says it's not suitable for sites with large numbers of users, which mine has for the front end but not for the back end that I actually care about. Having said that, I might be OK with software that tracks both front and back end login/logout, I'd have to test it to see if it's too much.
*I can't use that plugin because as it says:
LOGman will track a users logout when the user explicitly logs out by clicking the logout button. LOGman cannot track the logout if the users session expires."
so it only does part of the necessary job.
I found a similar question to this at https://forum.joomla.org/viewtopic.php?t=844869 which took me to another plugin, https://www.joomlathat.com/content-statistics, but it also doesn't display when a user is logged out due to inactivity, just when they click the "logout" button.
If there isn't a way to see a log of when someone logged out, is there at least a way to tell who is currently logged in?
onUserAfterLogin
line 777 andonUserLogout
line 864 that checks if it ischeckLoggable
and then logs those actions but no time is set, as you noted. How able are you to write PHP code? You can easily solve this with your own Plugin, since there are events you can just trigger on those same events and log the time.