[horde] LDAP Prefs + Horde 3.0 + IMP 4.0 Prob

KaalH! kaalh at smol.org
Mon May 20 03:45:15 PDT 2002


this appends only when the hordePrefs attribute doesn't exists in the ldap 
tree. typicaly, the first login attempt.

this patch should fix it : 

Index: ldap.php
===================================================================
RCS file: /repository/horde/lib/Prefs/ldap.php,v
retrieving revision 1.35
diff -u -r1.35 ldap.php
--- ldap.php    18 May 2002 05:46:54 -0000      1.35
+++ ldap.php    20 May 2002 10:41:28 -0000
@@ -336,7 +336,7 @@
         /* ldap_get_entries() converts attribute indexes to lowercase. */
         $field = strtolower($this->params['field']);
 
-        if (isset($result) && is_array($result[0][$field])) {
+        if (isset($result) && isset($result[0][$field]) && is_array($result[0]
[$field])) {
             /*
              * Set the requested values in the $this->prefs hash based on
              * the contents of the LDAP result.

-- 
KaalH!


Surlignage Joel Wiesmann <joel at secuserv.ch>:

> Hi there
> 
> I'm trying to get Horde with LDAP-Prefs working. I'm using the current CVS 
> Version cuz I heard about problems with the older versions.
> 
> After logging in I receive the following error msg:
> Notice: Undefined offset: 0 in 
> /usr/local/apache/htdocs/horde/lib/Prefs/ldap.php on line 339
>  
> Warning: LDAP: modify operation could not be completed. in 
> /usr/local/apache/htdocs/horde/lib/Prefs/ldap.php on line 444
>  
> Warning: Cannot add header information - headers already sent by (output 
> started at /usr/local/apache/htdocs/horde/lib/Prefs/ldap.php:339) in 
> /usr/local/apache/htdocs/horde/imp/redirect.php on line 94
> 
> When I check out the ldap db with slapcat I see that horde has written 
> informations in the db (ex. hordePrefs: horde:language:"). So I think there 
> shouldn't be a problem with ldap-access perms. The imp & horde test.php 
> scripts are also ok and I can login to the imap with the imp - test.php.
> 
> Anyone know what could be wrong?
> 
> Greets
> Joel Wiesmann
> 
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org


More information about the horde mailing list