Forums / General / ezpreferences in login.tpl (need a cache-block)

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

ezpreferences in login.tpl (need a cache-block)

Author Message

Eric Weik

Tuesday 04 January 2005 10:06:44 pm

I'm attempting to update the login.tpl template to output some user information stored in the ezpreferences system. However, the output does not change if the preference has changed until the user logs out and logs back in.

A simple example:
I.e.: I can update a variable (favorite_color) via a link to: /user/preferences/set/favorite_color/blue

And then output it via an override of login.tpl with:
{ezpreference( 'haircolor' )|wash}

It works fine. But if I change favorite_color to green, it will continue to output blue until the user logs out and logs back in. Even clearing all caches does not make it update!

Any suggestions?

liu spider

Tuesday 25 January 2005 8:56:07 pm

I had exactly the same bug.
this is a temporary fix for this issue.

Index: kernel/classes/ezpreferences.php
===================================================================
--- kernel/classes/ezpreferences.php    (revision 10604)
+++ kernel/classes/ezpreferences.php    (working copy)
@@ -107,7 +107,7 @@
                 $db->query( $query );
             }
         }
-        if ( $storeUserID !== false )
+//        if ( $storeUserID !== false )
             eZPreferences::storeInSession( $name, $value );
         return true;
     }

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Frederik Holljen

Wednesday 26 January 2005 1:27:46 am

if this is a bug in Exponential, can you please report it?