Forums / Developer / fetch user problem with session confusion

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

eZ debug

Timing: Jan 21 2025 02:41:14
Script start
Timing: Jan 21 2025 02:41:14
Module start 'content'
Timing: Jan 21 2025 02:41:14
Module end 'content'
Timing: Jan 21 2025 02:41:14
Script end

Main resources:

Total runtime0.1619 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.8438180.8125
Module start 'content' 0.00730.0041 768.656398.0547
Module end 'content' 0.01140.1503 866.7109526.6250
Script end 0.1617  1,393.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.2187200.0002
Check MTime0.00140.8394200.0001
Mysql Total
Database connection0.00090.559110.0009
Mysqli_queries0.115571.35201410.0008
Looping result0.00150.90181390.0000
Template Total0.150092.610.1500
Template load0.00090.533210.0009
Template processing0.149192.106410.1491
Override
Cache load0.00060.378710.0006
Sytem overhead
Fetch class attribute can translate value0.00080.522010.0008
XML
Image XML parsing0.00030.167510.0003
General
dbfile0.00291.7873200.0001
String conversion0.00000.004430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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