/** * Make sure an organization exists in the directory * * @param $organization * @return bool */ protected function _addOrganization($organization) { $info = array('o' => $organization, 'objectclass' => array('organization', 'top')); $dn = 'o=' . $organization . ',' . $this->_ldapClient->getBaseDn(); if (!$this->_ldapClient->exists($dn)) { $result = $this->_ldapClient->add($dn, $info); $result = $result instanceof Zend_Ldap; } else { $result = TRUE; } return $result; }