CMS Development

danbraun
Member

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.

3 Replies 3
SanttuH
Member | Elite Partner
Member | Elite Partner

Detect if user is logged in

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

Thanks

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Detect if user is logged in

Hi, @danbraun 👋 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

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
johnphilipking
Participant

Detect if user is logged in

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

0 Upvotes