Forums / Developer / Current user is logged?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Current user is logged?

Author Message

David Santiso

Sunday 23 January 2011 12:03:47 pm

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

Sylvain Guittard

Sunday 23 January 2011 1: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

http://www.vignevin-epicure.com
http://twitter.com/vignevinEPIcure

David Santiso

Monday 24 January 2011 11:30:21 am

Thank you very much.