How to pull a user's User ID during the session

Hey everyone,

Is there any way to find your User ID during the session when logged in with User Accounts? I’ve been searching through the Network and Application tabs to try and find this User ID to no avail.

I’m trying to build a dashboard for individual users and I need to build out a system for identifying the user who is signed in and pulling info from a related CMS collection for that user. I believe I can do this if I can find the User ID stored somewhere during the session.

Many thanks in advance!

Hi Avery, not natively.

One way is to create a custom user field which is a text string, then setup an external automation that populates it as new user accounts are created.

You can then access the custom user info using SA5’s user info lib.

However I don’t consider this approach to be industrial-strength, it’s overly complex and high-latency in the data-acquisition process. If you need something more complete and lightning-fast, I have a much more robust solution involving a reverse proxy setup.

Drop me a message if you are interested in a custom-built user-info setup for your project. You can get all user info pieces there including the access groups, custom fields and user ID.