[horde] Neglected _prefs_hooks

Andrew Morgan morgan at orst.edu
Tue Nov 11 00:43:26 UTC 2008


On Mon, 10 Nov 2008, Shaun Meyer wrote:

> Hi,
>
> I've been unable to get a pair of hooks, _prefs_hook_username() and 
> _prefs_hook_from_addr(), to execute in Horde 3.3 / imp 4.3.
>
> I've gotten down to this:
>
> horde/config/hooks.php:
> if (!function_exists('_prefs_hook_from_addr')) {
>   function _prefs_hook_from_addr($user = null)
>   {
>       return 'iRan at nowhere.com';
>   }
> }
>
> horde/config/prefs.php:
> $_prefs['from_addr'] = array(
>   'value' => null,
>   'locked' => true,
>   'shared' => true,
>   'type' => 'text',
>   'hook' => true,
>   'desc' =>  _("Your From: address:")
> );
>
> Surprisingly my from address isn't being set to 'iRan at nowhere.com' on login.
>
> I have a test account whose preferences are cleared with the SQL statement, 
> "DELETE FROM horde_prefs WHERE pref_uid = '(testaccount)';" and it hasn't had 
> any better luck with it's own from_addr.
>
> Why are my hooks being neglected?

This looks the same as my working from_addr hook, although I have:

   'value' => '',

in the preference instead of "null".

 	Andy


More information about the horde mailing list