fetch user problem with session confusion

Author Message

Samuel Sauder

Friday 09 June 2006 12:43:06 pm

If I login as user1 then login as user2. The login/logout verbiage from the toolbar says I am now user2. But in the body of the page it identifies me as user1.

In the body template, I have this code:

{def $user=fetch( 'user', 'current_user' )}
User:     {$user.contentobject.name} <br />

If I clear the cache, then the body shows the correct user2.

It appears the session is always pulling from the previous logged in user rather than "current". It also appears that current_user in pagelayout is always correct.

Is this a bug?

version: 3.7.2 on mysql

Kristof Coomans

Saturday 10 June 2006 12:02:36 am

Hi Samuel

Do you experience the same behavior in the latest release of the 3.7 branch?

What do you mean with the body template? And which caches do you have to clear to make it work?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Marcin Drozd

Saturday 10 June 2006 4:06:17 am

Hi
I had the same problem (ez 3.7.6)
but I put {set-block scope=root variable=cache_ttl}0{/set-block} in my template and it was good

http://ez-publish.pl

Samuel Sauder

Monday 12 June 2006 9:40:17 am

Thanks, that was it!

Samuel Sauder

Monday 12 June 2006 9:43:22 am

I'm guessing this is the bug
http://ez.no/community/bugs/cache_block_with_expiry_0_always_expires_when_templatecompiling_is_disabled

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 22:58:36
Script start
Timing: Jan 18 2025 22:58:36
Module start 'layout'
Timing: Jan 18 2025 22:58:36
Module start 'content'
Timing: Jan 18 2025 22:58:38
Module end 'content'
Timing: Jan 18 2025 22:58:38
Script end

Main resources:

Total runtime1.6167 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 588.0469152.6406
Module start 'layout' 0.00710.0025 740.687539.4766
Module start 'content' 0.00961.6055 780.1641587.9766
Module end 'content' 1.61510.0015 1,368.140612.4375
Script end 1.6166  1,380.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.1947160.0002
Check MTime0.00130.0782160.0001
Mysql Total
Database connection0.00140.087110.0014
Mysqli_queries1.554996.1806650.0239
Looping result0.00080.0484630.0000
Template Total1.578197.620.7891
Template load0.00220.138920.0011
Template processing1.575897.475020.7879
Template load and register function0.00020.013410.0002
states
state_id_array0.00120.076810.0012
state_identifier_array0.00280.171920.0014
Override
Cache load0.00190.1190240.0001
Sytem overhead
Fetch class attribute can translate value0.00070.045130.0002
Fetch class attribute name0.00110.071160.0002
XML
Image XML parsing0.00420.262230.0014
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00530.3255160.0003
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs