Timestamp for last login?

How can I check to see when someone last logged in? I’m doing a cull of current accounts and I’d like to add a column to the people page to see when the last login date was for each person.

Where would I find that?

1 Like

Hi @JagexDrew,

Here’s how I would go about it… but first, a bit of a disclaimer. Working with event log entries can lead to pretty expensive database queries so please be careful and filter / constrain your event log queries as much as possible with sensible filters.

With that out of the way, I think what you’re looking for is a Query field. The following configuration would likely get you what you need.

You’d add this query field on the Person entity. The query field will show the latest EventLogEntry which shows a login event for the person. I’ve also added a filter which will look at EventLogEntry records from only the past 2 months. I put this in for efficiency’s sake but you might want to change that. Beyond making the query more efficient, I was also assuming that if the user hasn’t logged into the site in the past 2 months, they might be part of your culling. That’s up to you to tweak.

This basic blueprint is probably what your looking for but feel free to riff on the above to your heart’s content. Good luck!

3 Likes

Thanks Sir,
That’s on the money, I’m not running it lots so the overhead isn’t an issue

Cheers

2 Likes