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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:39:07
Script start
Timing: Jan 18 2025 19:39:07
Module start 'layout'
Timing: Jan 18 2025 19:39:07
Module start 'content'
Timing: Jan 18 2025 19:39:07
Module end 'content'
Timing: Jan 18 2025 19:39:07
Script end

Main resources:

Total runtime0.0164 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.9141152.6250
Module start 'layout' 0.00590.0033 740.539139.4453
Module start 'content' 0.00920.0054 779.984489.4453
Module end 'content' 0.01460.0018 869.429730.3047
Script end 0.0163  899.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002816.8218140.0002
Check MTime0.00116.5452140.0001
Mysql Total
Database connection0.00074.287710.0007
Mysqli_queries0.003521.514430.0012
Looping result0.00000.286910.0000
Template Total0.00158.910.0015
Template load0.00074.574610.0007
Template processing0.00074.306710.0007
Override
Cache load0.00052.969710.0005
General
dbfile0.00021.166680.0000
String conversion0.00000.030640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs