nvazquez commented on issue #5989:
URL: https://github.com/apache/cloudstack/issues/5989#issuecomment-1042522386


   Sorry for the delay @nxsbi - I think there is no actual way to retrieve this 
information. However, you can query the events for user logins and their last 
login date to have an idea of the active users (however this approach may not 
be accurate):
   
   ````
   select u.id as user_id, u.username, u.account_id, a.account_name, 
max(e.created) as last_login
   from event e join user u on (e.user_id = u.id) join account a on 
(u.account_id = a.id)
   where e.type = 'USER.LOGIN' GROUP BY e.user_id;
   ````


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to