You are not logged in.
Pages: 1
how can i see last access timestamp of each user?
Offline
Search in the TAuthSession.User property of TSQLRestServer.fSessions[] array: the last access time stamp is stored in LastAccess property.
Please note that access to the fSessions[] array is protected by a fSessionCriticalSection lock.
See some code for safe access to fSessions[] array in TSQLRestServer.SessionGetUser() method.
Offline
yes i know session but with this i can have just the user logged in, instead i want to know the last access of all user. it's possible?
Offline
No, it is not possible by default, since there is no such data stored within the database.
The only data available is in the TAuthSession in-memory tables.
You will have to save it in the database, e.g. in a dedicated audit-trail table (like in the MainDemo).
Or you may use the TSQLAuthUser.Data blob field to store some data within (e.g. via a RecordSave), and set the latest accessed date and time (and IP, or other).
Offline
i understand.
i think there is an easy way to do but its ok, when i have time to try i post my solution for other user.
thanks a lot.
Emanuele.
Offline
How can i convert the last access property in date and time?
Tanks
Offline
Thanks ab.
it works with iso8601now but with last access it returns an error.
for example lastaccess is 19775435, and iso86now is 135032268700
Offline
I'm sorry, I did not check the source code earlier.
So my answer above was incorrect.
lastaccess is NOT an Iso8601 timestamp.
This is a cardinal value retrieved from GetTickCount. GetTickCount is much faster than the TDateTime equivalency.
There is no easy way of converting it into a time stamp.
Purpose of LastAccess was not to be retrieved directly, but to handle session timeouts.
Offline
Thanks for your answer ab
Offline
Pages: 1