This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » eZ Publish 5 Platform » How to check whether a user is logged...
expandshrink

How to check whether a user is logged in or not ?

How to check whether a user is logged in or not ?

Tuesday 09 September 2014 6:02:28 pm - 3 replies

Hi,
What is the former way to check whether a user is logged in or not (equivalent to "is_logged_in" for ez4 ezUser object) ?

Thanks,

Hakim

Tuesday 09 September 2014 6:30:35 pm

Jérôme might have to comment on that, but you'll have to check against symfony user basically.

What are you trying to solve from user perspective? (ways to solve things are different in new stack which is why I ask)

Modified on Tuesday 09 September 2014 6:30:58 pm by André R

Tuesday 09 September 2014 8:06:40 pm

Quote from André R :

What are you trying to solve from user perspective?

I wanted to custom a left side panel (depending if the user is logged in or not), and while I was answering I thought about a better use case : the login button ... and look inside the demo bundle... blunk.gif Emoticon

I found :

{% if is_granted( 'IS_AUTHENTICATED_REMEMBERED' ) %}

Might deserve an entry in the user service ?

Hakim

Tuesday 07 October 2014 7:12:17 am

The reply has been removed because of violation of forum rules.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from