Sometimes when I login as "user A" and I navigate on the site, my username changes to "user B" ( for example ).

Example :

Let's say there are 3 user-related pages : "My profile", "My links", "My Content".

I login as "user A" and I click on "My links". Suddenly, my username changes to "user B". Maybe because "user B" visited "My links" page before "user A" and "My links" page is already cached, so I get "user B" cached result.

How can I fix this problem ?

Comments

Jonah Ellison’s picture

Category: bug » support

Authcache requires the same final HTML for each user... the username should not be in the HTML source. If it is, you'll need to use JavaScript to render the username. See the project page for documentation (you can try modifying your theme to use $user_name).

jorje29’s picture

Jonah,

Thank you for the reply

I read also -> http://drupal.org/node/514776 and I used $user_name but sometimes the value of the variable disappears from cached pages ( probably because the page is cached by another user ) .

Updated : The $user_name value disappears from {content-type}.tpl.php pages. It's like $user_name variable has a value in page.tpl.php, but not in {content-type}.tpl.php pages.

You say " you'll need to use JavaScript to render the username ". How can I achieve that ?

Thanx

simg’s picture

Status: Active » Closed (fixed)