Ensure the LDAP driver actually gets the configuration.
authorGunnar Wrobel <p@rdus.de>
Fri, 3 Apr 2009 15:04:14 +0000 (17:04 +0200)
committerGunnar Wrobel <p@rdus.de>
Fri, 3 Apr 2009 15:04:14 +0000 (17:04 +0200)
framework/Kolab_Server/lib/Horde/Kolab/Server/Ldap.php

index f7371db..c06df83 100644 (file)
@@ -37,6 +37,13 @@ class Horde_Kolab_Server_Ldap extends Horde_Kolab_Server
     private $_ldap;
 
     /**
+     * The configuration for connection to the LDAP server.
+     *
+     * @var array
+     */
+    private $_config;
+
+    /**
      * Base DN of the LDAP server.
      *
      * @var string
@@ -73,6 +80,8 @@ class Horde_Kolab_Server_Ldap extends Horde_Kolab_Server
         $config['binddn'] = $config['uid'];
         $config['bindpw'] = $config['pass'];
 
+        $this->_config = $config;
+
         $this->connect();
 
         parent::__construct($params);
@@ -88,7 +97,7 @@ class Horde_Kolab_Server_Ldap extends Horde_Kolab_Server
      */
     protected function connect()
     {
-        $this->_ldap = Net_LDAP2::connect($config);
+        $this->_ldap = Net_LDAP2::connect($this->_config);
         if (is_a($this->_ldap, 'PEAR_Error')) {
             throw new Horde_Kolab_Server_Exception($this->_ldap);
         }