Creation of the manager account should not happen if there is one already.
authorGunnar Wrobel <p@rdus.de>
Mon, 23 Mar 2009 10:25:52 +0000 (10:25 +0000)
committerGunnar Wrobel <p@rdus.de>
Mon, 23 Mar 2009 10:38:09 +0000 (11:38 +0100)
framework/Kolab_Server/lib/Horde/Kolab/Server/test.php

index 44843c4..86cb55f 100644 (file)
@@ -106,17 +106,19 @@ class Horde_Kolab_Server_test extends Horde_Kolab_Server_ldap
             && isset($this->params['adminpass'])) {
             $base_dn = isset($this->params['basedn']) ? ',' . $this->params['basedn'] : '';
             $dn = 'cn=' . $this->params['adminuser'] . ',cn=internal' . $base_dn;
-            $ldap_data = array(
-                'cn' => array('manager'),
-                'sn' => array('n/a'),
-                'uid' => array('manager'),
-                'userPassword' => array($this->params['adminpass']),
-                'objectClass' => array('top','inetOrgPerson','kolabInetOrgPerson')
-            );
-            $this->data[$dn] = array(
-                'dn' => $dn,
-                'data' => $ldap_data
-            );
+            if (!isset($this->data[$dn])) {
+                $ldap_data = array(
+                    'cn' => array('manager'),
+                    'sn' => array('n/a'),
+                    'uid' => array('manager'),
+                    'userPassword' => array($this->params['adminpass']),
+                    'objectClass' => array('top','inetOrgPerson','kolabInetOrgPerson')
+                );
+                $this->data[$dn] = array(
+                    'dn' => $dn,
+                    'data' => $ldap_data
+                );
+            }
         }
 
         $this->store();