Checking last time user accessed app

Hi there,

Is there a way to see the last time a user logged in the app?

Or do I need to set up a database field and update it?

Hi @Nocodify :slight_smile: Setting up and updating a database field is the way to do this. If Users stay logged in and you’d like to see when they were last online (not just when they last logged in), you can also update the field when each page is loaded.

For more real-time updates, you can add a ‘do every 10 seconds’ (or any increment you choose) workflow to each page which updates the field when a User is logged in as well. If you do this, you’ll also need a custom state (of type: date) which updates to be the current/date time every few seconds (otherwise using current/date time will give you the time the page was loaded each time).

It will probably be easiest to have this all within a reusable element, such as a header, so that you don’t have to set this up individually on each page. Feel free to let me know if you have any questions! :slight_smile:

Thank you! I figured this was the only way to do this, I just thought there might be something in the database that I’m not seeing.

1 Like