Share » Forums » Setup & design » Scope of $current_user variable

Scope of $current_user variable

Scope of $current_user variable

Thursday 08 December 2005 11:49:25 am - 1 reply

Author Message

Ɓukasz Serwatka

Monday 12 December 2005 12:02:34 am

Hi James,

This variables are available only in pagelayout.tpl. What you can do in product.tpl is fetch current user and compare it with variable AnonymousUserID from site.ini for example:

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

{if eq( $current_user.contentobject.id, 
                 ezini( 'UserSettings', 'AnonymousUserID', 'site.ini' ) )}
.
.
.

 

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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

36 542 Users on board!

Forums menu