Logged-in user id

I’ve looked at the functions here:

https://support.livewhale.com/live/blurbs/lw-functions

and I see where you can get user status, but is there a way to get the login id or user id of the currently logged-in user?

Thanks,

-= G =-

I should add that I’m mostly interested in SSO users so I’d want the SSO id they logged in with…

Hi G,

I believe in a custom module or script you can use $_SESSION['livewhale']['manage']['username'] to access this information. If you’re going to be using it often, you could also consider saving it to an XPHP variable (i.e. in $GLOBALS) in onLoad for instance, so it’d be available in later processes. Hope this helps!

very helpful - thanks!

I should have thought of $_SESSION - I was thinking of a LW-internal type thing and didn’t even try the more general PHP offerings!

1 Like