[horde] username always null in prefs_init hooks with LDAP auth

Guenter Bartsch guenter.bartsch at gmail.com
Mon Oct 7 20:58:14 UTC 2013


>> 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.

hmm - actuall my log output clearly shows the hook is being called
each time I log in so this is (for whatever reason) not the problem in
our case.

the real issue is no username is passed - I did look at the comments
in the hook templates, they mention this is the case when the user is
not authenticated. however, login and therefore authentication works
fine using ldap - I am wondering if we might have our whole auth chain
upside down (i.e. we should have imp authenticate against ldap/imap
while the rest of horde uses the imp for authentication instead of the
other way round) ?


More information about the horde mailing list