[horde] Prefences: hooks and default values

Jan Schneider jan at horde.org
Sun Oct 24 12:36:59 UTC 2010


Zitat von Diego Woitasen <diegows at xtech.com.ar>:

> Hi,
>  Let me know if I'm wrong. The default values and hooks are used in a
> preference only if the user doesn't have that preference with a value. This
> usually means, the users hasn't logged in to the Webmail yet.

No, this usually means that the user hasn't changed any settings yet.  
There are a few preference exceptions from this rule that are saved  
automatically without user interaction.

>  I want to change the value of a preferences for all users, but I was trying
> with hooks and it doesn't work. It looks like hooks are called only if the
> preference value is empty.

No, but only of the preference value has not been saved for the user.

>  One option is to remove the preference from the backend. Using file appears
> that shoudnl't work because the preferences file is written on user logout
> so if I delete the key and the users is logged, it will be written again on
> logout.

No, changed preferences are saved at the end of the request. They are  
cached in the user's session though, so changing preferences on the  
server doesn't have any effect until the user logs in again.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list