/** * the constructor * * @param array $options Options used in connecting, binding, etc. */ public function __construct(array $_options) { parent::__construct(); if (empty($_options['userUUIDAttribute'])) { $_options['userUUIDAttribute'] = 'entryUUID'; } if (empty($_options['groupUUIDAttribute'])) { $_options['groupUUIDAttribute'] = 'entryUUID'; } if (empty($_options['baseDn'])) { $_options['baseDn'] = $_options['userDn']; } if (empty($_options['userFilter'])) { $_options['userFilter'] = 'objectclass=posixaccount'; } if (empty($_options['userSearchScope'])) { $_options['userSearchScope'] = Zend_Ldap::SEARCH_SCOPE_SUB; } if (empty($_options['groupFilter'])) { $_options['groupFilter'] = 'objectclass=posixgroup'; } $this->_options = $_options; if (isset($_options['readonly']) || array_key_exists('readonly', $_options)) { $this->_isReadOnlyBackend = (bool) $_options['readonly']; } if (isset($_options['ldap']) || array_key_exists('ldap', $_options)) { $this->_ldap = $_options['ldap']; } if (isset($this->_options['requiredObjectClass'])) { $this->_requiredObjectClass = (array) $this->_options['requiredObjectClass']; } if (!array_key_exists('groupsDn', $this->_options) || empty($this->_options['groupsDn'])) { $this->_isDisabledBackend = true; } $this->_userUUIDAttribute = strtolower($this->_options['userUUIDAttribute']); $this->_groupUUIDAttribute = strtolower($this->_options['groupUUIDAttribute']); $this->_baseDn = $this->_options['baseDn']; $this->_userBaseFilter = $this->_options['userFilter']; $this->_userSearchScope = $this->_options['userSearchScope']; $this->_groupBaseFilter = $this->_options['groupFilter']; if (isset($_options['plugins']) && is_array($_options['plugins'])) { foreach ($_options['plugins'] as $className) { $this->_plugins[$className] = new $className($this->getLdap(), $this->_options); } } }
/** * the constructor * * @param array $options Options used in connecting, binding, etc. */ public function __construct(array $_options) { parent::__construct(); if (empty($_options['userUUIDAttribute'])) { $_options['userUUIDAttribute'] = 'entryUUID'; } if (empty($_options['groupUUIDAttribute'])) { $_options['groupUUIDAttribute'] = 'entryUUID'; } if (empty($_options['baseDn'])) { $_options['baseDn'] = $_options['userDn']; } if (empty($_options['userFilter'])) { $_options['userFilter'] = 'objectclass=posixaccount'; } if (empty($_options['userSearchScope'])) { $_options['userSearchScope'] = Zend_Ldap::SEARCH_SCOPE_SUB; } if (empty($_options['groupFilter'])) { $_options['groupFilter'] = 'objectclass=posixgroup'; } if (isset($_options['requiredObjectClass'])) { $this->_requiredObjectClass = (array) $_options['requiredObjectClass']; } if (array_key_exists('readonly', $_options)) { $this->_isReadOnlyBackend = (bool) $_options['readonly']; } $this->_options = $_options; $this->_userUUIDAttribute = strtolower($this->_options['userUUIDAttribute']); $this->_groupUUIDAttribute = strtolower($this->_options['groupUUIDAttribute']); $this->_baseDn = $this->_options['baseDn']; $this->_userBaseFilter = $this->_options['userFilter']; $this->_userSearchScope = $this->_options['userSearchScope']; $this->_groupBaseFilter = $this->_options['groupFilter']; $this->_ldap = new Tinebase_Ldap($_options); $this->_ldap->bind(); $this->_sql = new Tinebase_Group_Sql(); foreach ($_options['plugins'] as $className) { $this->_plugins[$className] = new $className($this->_ldap, $this->_options); } }
/** * construct a typo3 user backend */ public function __construct() { parent::__construct(); $this->_t3db = $this->_db; }