Developer forum

Forum » Development » Login date

Reply


How can I get the last login date for each user?


Replies

 
Nicolai Høeg Pedersen
Reply

If it is for extranet users:

On stylesheet.mdb:
SELECT top 1 Statv2Session.Statv2SessionTimestamp
FROM Statv2Session
WHERE (((Statv2Session.Statv2SessionExtranetUserID)=424))
ORDER BY Statv2Session.Statv2SessionID DESC

 
Nicolai Høeg Pedersen
Reply

 
Reply
Thanks!!
 
Reply
Hi. I tried the code in a query but it doesnt seem to work correctly for me. It only returns a result for a few of our extranet users. And the time is only slightly accurate (105 min off) when the user is logged in. When the user is logged out, the query returns a older date.
Any ideas of what's wrong?
 
Nicolai Høeg Pedersen
Reply
Could you show some code? Especially your Query.
 
Reply
The query is identical to the code you posted earlier:
"SELECT top 1 Statv2Session.Statv2SessionTimestamp
FROM Statv2Session
WHERE (((Statv2Session.Statv2SessionExtranetUserID)=424))
ORDER BY Statv2Session.Statv2SessionID DESC"

I've looked at the StatV2Session table and only a few of the ExtranetUsers get's their sessions registered. And very few sessions at all are registered with a extranetuserID. And those that are registered only have the timestamp of the current session as long as they are logged in. After logout, the latest timestamp is lost.
I use "/admin/public/extranetlogoff.aspx?ID=XX" to logout
 
Nicolai Høeg Pedersen
Reply
Found a bug that resets the user login information in stat database if you use ExtranetLogoff.aspx.

Will be out with 7.1

 

You must be logged in to post in the forum