[horde] username always null in prefs_init hooks with LDAP auth
Jan Schneider
jan at horde.org
Mon Oct 7 16:20:19 UTC 2013
Zitat von Guenter Bartsch <guenter.bartsch at gmail.com>:
> Hi,
>
> we're trying to apply
>
> http://wiki.horde.org/LDAPHooksHorde5
>
> to our horde setup which is using ldap authentication to set up the
> default from email address for all users. unfortunately it doesn't
> work because $username is always null when the hook is called:
>
> Sep 30 10:37:02 mail2 HORDE: [horde] prefs_init, pref=from_addr [pid 30196]
> Sep 30 10:37:02 mail2 HORDE: [horde] prefs_init, username= [pid 30196]
>
> this is the code we have added to generate the log output pasted above:
>
> <?php
> class Horde_Hooks
> {
> public function prefs_init($pref, $value, $username, $scope_ob)
> {
>
> $logger = $GLOBALS['injector']->getInstance('Horde_Log_Logger');
> $logger->info('prefs_init, pref=' . $pref);
> $logger->info('prefs_init, username=' . $username);
>
> anybody got any idea how to debug this further?
>
> thanks,
>
> guenter
The hooks is only called if the preference or identities are not set
yet, i.e. for guests or new users.
--
Jan Schneider
The Horde Project
http://www.horde.org/
More information about the horde
mailing list