[horde] prefs_hook for an horde application - is it possible?
Jan Schneider
jan at horde.org
Sun Jun 7 09:11:40 UTC 2009
Zitat von Matthias Rolke <m.rolke at linux-ag.com>:
> Hi there,
> i'm currently trying to determine the value of a user preference by a
> hook.
> This is pretty easy for preferences in the scope 'horde' and thus being
> configured in horde/config/hooks.php, horde/config/prefs.php.
> But in my case, i want to determine a preference value for an horde
> application.
>
> So, i created a prefs_hook in my "application/config/hooks.php" and
> enabled it in
> "application/config/prefs.php" like it is described in
> "horde/config/prefs.php".
>
> But the problem, afaik, is that the preference hooks are only being executed
> on login.
> "NOTE 2: Preferences hooks are ONLY executed on login."
> (horde/config/hooks.php)
>
> And sadly on login, the application preferences are not being loaded.
That's because that sentence is not exactly correct. What it means is
that the hooks are only executed once after login, because the prefs
are only loaded once after the login. And the prefs for an application
are only loaded if the application is accessed.
> So, my question is the following:
> Is there any possibility to determine a value for a preference value for
> an application?
>
> If you're interested, here is my exact case:
> * I'm using Kolab as the source for addressbooks in turba
> * The default_dir for every user should be his/her personal Kolab
> addressbook, stored in the personal Kolab mailbox
> * The source type name for that personal addressbook is "kolab"
> (see turba/config/sources.php), but for the user
> the default_dir value has to be an uid like user at example.com (the
> name of the kolab mailbox)
> * therfore only a hook would determine the right value for the
> "default_dir" preference for each user
What you try to do should work, just not right after the login, but as
soon as the user accesses Turba.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.horde.org/archives/horde/attachments/20090607/e12738a7/attachment.bin>
More information about the horde
mailing list