Detect if user is logged in

Hi. I’d like to detect if a user visiting a page is logged in and conditionally run javascript based on this. I would like to apply this code in a module via design manager area.

Backgroud: Im trying to detect if one of our staff members is accessing the page from the Activities timeline, and prevent the auto submission of a form I have set up on that page if that is the case.

Is it possible to detect if the user is logged in? Thank you.

Hi, @danbraun :waving_hand: Thanks for reaching out. Let’s see if our community members have tried to solve for this challenge or have any workarounds to suggest. Hey, @JBeatty @Anton @Phil_Vallender @LMeert, do you have any suggestions for @danbraun?

Best,

Jaycee

I, too, am looking for the ability to detect an internal logged-in user on our production pages.

Hey, would love to know if there’s an anwser to this.
Thanks