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 » Developer » Current user is logged?
expandshrink

Current user is logged?

Current user is logged?

Sunday 23 January 2011 9:03:47 pm - 2 replies

Hi,

If the current user is logged in from any template, what variables I can use to see it?

I've seen that pagelayout template uses

{if $current_user.is_logged_in}

but, for example, the templates that show the content from the nodes, doesn't work.

Thanks,

David

Modified on Sunday 23 January 2011 9:05:30 pm by David Santiso

Sunday 23 January 2011 10:04:36 pm

Hi David,

In the template that show the content of a node, you must use this code:

{def $current_user=fetch( 'user', 'current_user' )}

And then, you can use your code...

Sylvain

Monday 24 January 2011 8:30:21 pm

Thank you very much.

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from