Conditional statement for logged in/logged out?


#1

I’m using a custom menu. Is there a conditional statement where I can display different things depending on if someone is logged in or not? Thanks!


#2

Sure. You can use checkAuthenticated twig function.

See example : https://github.com/userfrosting/UserFrosting/blob/master/app/sprinkles/account/templates/navigation/main-nav.html.twig#L6


#3

Awesome, thanks! :smiley: :smiley: