[horde] Custom Defaults / Hooks

Adam Tauno Williams awilliam at whitemice.org
Wed Jul 20 18:17:53 UTC 2011


On Wed, 2011-07-20 at 11:05 -0600, Michael M Slusarz wrote:
> >>>> I my horde/config/prefs.local.php I've defined two defaults like:
> >>>> $_prefs['ldap_userdn'] = array(
> >>>>  'locked' => false,
> >>>>  'type' => 'text',
> >>>>  'desc' => _("LDAP Distinguished Name of user object"),
> >>>>  'hook' => true
> >>>> );
> >>>> $_prefs['ldap_usercn'] = array(
> >>>>  'locked' => false,
> >>>>  'type' => 'text',
> >>>>  'desc' => _("CN of user object"),
> >>>>  'hook' => true
> >>>> )
> >>>> Then in horde/config/hooks.php I've added a simple test to see if the
> >>>> hook ever gets hit; and it doesn't .  Can I have hooks for 'custom'
> >>>> defaults or do I need to register them somehow beyond inclusion in the
> >>>> prefs.local.php -
> >>>> hooks.php
> >>>> -------------------------
> >>>> class Horde_Hooks
> >>>> {
> >>>> //    // PREFERENCES INIT: See above for documentation.
> >>>>  public function prefs_init($pref, $value, $username, $scope_ob)
> >>>>  {
> >>>>      syslog(LOG_ALERT, "Horde hook for pref: " . $pref);
> >>>> That syslog statement never appears in the log
> Your preferences need a value entry.  They will be ignored otherwise.

THANK YOU.  As soon as I added "'value' => ''," to the preferences the
hook fired; it is now working correctly.



More information about the horde mailing list