Forums / Developer / Problem fetching current user

Problem fetching current user

Author Message

Adolfo Barragán

Monday 21 February 2005 9:08:05 am

I want a page named "My Account" (for registered users) witn links to "my information", "change password", "my bookmarks", "my drafts", etc. So I've created a folder "my account" and an override for it (myaccount.tpl). Also I've created an included template for user menu (user_menu.tpl).

In these templates I fetch current user and I concat userID on links, but it not work. The caching mecanism don't refresh current user, so the userID is for the user that generates cache page, not for actual current user.

What is wrong? How can I solve this problem?

Thanks in advance,
Adolfo Barragán

Łukasz Serwatka

Monday 21 February 2005 11:37:39 am

You must disabled cache for this template.

Put this at the first line in your tpl file.

{set-block scope=root variable=cache_ttl}0{/set-block}

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

Adolfo Barragán

Tuesday 22 February 2005 11:28:19 am

It work fine,

Thanks
Adolfo Barragán