[support] How to disable caching of a block
Arne 'Timwi' Heizmann
timwi at gmx.net
Sun Apr 6 23:34:26 UTC 2008
Hi,
On my Drupal site I tried to create a block to show the username you are
currently logged in as. Unfortunately, it always shows "Timwi" (my own
username) even if I'm logged in under another account. I believe this is
because the block is rendered and then cached when it is created or its
settings changed, and not when the page is viewed.
This effect occurs even if "Caching" under "Performance"
(admin/settings/performance) is disabled.
(In order to display the logged-in user in the block, I created a simple
Input Format that lets me use a "[user]" tag to insert the username. In
the code, it uses "global $user; return $user->name;".)
How can I achieve what I want? All I want is for it to display who I'm
logged in as.
Thanks in advance!
Timwi
More information about the support
mailing list