User Login Stats and Session Time Reports
4 December, 2009
Is there a way to track when users logged in and how long they were logged in using the usage reports? What tables/fields would I need to expose?
This information is stored in the Event table. You will need to filter by EventTypeCode = 'USERACCESS'. There is a record created when a user logs in, and another record created when the user logs out or their session times out. The EventCode will be set to 'LOGIN', 'LOGOUT', or 'SESSIONTIMEOUT' respectively. The IpSource column is the user's internal id which can be linked to the Person table to get their name.
The GMTDateTime column stores the event time, in the format yyyyMMddhhmmss - this is in the GMT timezone.
For example:
select e.GMTDateTime, p.FullName, e.EventCode from Event e, Person p where e.EventTypeCode = 'USERACCESS'
and e.IpSource = p.IpPerson
The GMTDateTime column stores the event time, in the format yyyyMMddhhmmss - this is in the GMT timezone.
For example:
select e.GMTDateTime, p.FullName, e.EventCode from Event e, Person p where e.EventTypeCode = 'USERACCESS'
and e.IpSource = p.IpPerson