protected function init($args) { parent::init($args); $args = is_array($args) ? $args : array(); if (!isset($args['DB_TYPE'])) { $args = array_merge(Kurogo::getSiteSection('database'), $args); } $this->connection = new db($args); if (isset($args['SORTFIELDS']) && is_array($args['SORTFIELDS'])) { $this->sortFields = $args['SORTFIELDS']; } $this->table = isset($args['DB_USER_TABLE']) ? $args['DB_USER_TABLE'] : 'users'; $this->fieldMap = array( 'userid'=>isset($args['DB_USERID_FIELD']) ? $args['DB_USERID_FIELD'] : 'userID', 'email'=>isset($args['DB_EMAIL_FIELD']) ? $args['DB_EMAIL_FIELD'] : 'email', 'firstname'=>isset($args['DB_FIRSTNAME_FIELD']) ? $args['DB_FIRSTNAME_FIELD'] : 'firstname', 'lastname'=>isset($args['DB_LASTNAME_FIELD']) ? $args['DB_LASTNAME_FIELD'] : 'lastname' ); }
protected function init($args) { parent::init($args); if (isset($args['HOST'])) { $this->setHost($args['HOST']); } $this->port = isset($args['PORT']) ? $args['PORT'] : 389; $this->searchBase = isset($args['SEARCH_BASE']) ? $args['SEARCH_BASE'] : ''; $this->adminDN = isset($args['ADMIN_DN']) ? $args['ADMIN_DN'] : null; $this->adminPassword = isset($args['ADMIN_PASSWORD']) ? $args['ADMIN_PASSWORD'] : null; $this->searchTimelimit = isset($args['SEARCH_TIMELIMIT']) ? $args['SEARCH_TIMELIMIT'] : 30; $this->readTimelimit = isset($args['READ_TIMELIMIT']) ? $args['READ_TIMELIMIT'] : 30; $this->fieldMap = array('userid' => isset($args['LDAP_USERID_FIELD']) ? $args['LDAP_USERID_FIELD'] : 'uid', 'email' => isset($args['LDAP_EMAIL_FIELD']) ? $args['LDAP_EMAIL_FIELD'] : 'mail', 'fullname' => isset($args['LDAP_FULLNAME_FIELD']) ? $args['LDAP_FULLNAME_FIELD'] : '', 'firstname' => isset($args['LDAP_FIRSTNAME_FIELD']) ? $args['LDAP_FIRSTNAME_FIELD'] : 'givenname', 'lastname' => isset($args['LDAP_LASTNAME_FIELD']) ? $args['LDAP_LASTNAME_FIELD'] : 'sn', 'phone' => isset($args['LDAP_PHONE_FIELD']) ? $args['LDAP_PHONE_FIELD'] : 'telephonenumber'); if (isset($args['SORTFIELDS']) && is_array($args['SORTFIELDS'])) { $this->sortFields = $args['SORTFIELDS']; } }
protected function init($args) { parent::init($args); $this->port = isset($args['PORT']) ? $args['PORT'] : 389; $this->searchBase = isset($args['SEARCH_BASE']) ? $args['SEARCH_BASE'] : ''; $this->adminDN = isset($args['ADMIN_DN']) ? $args['ADMIN_DN'] : null; $this->adminPassword = isset($args['ADMIN_PASSWORD']) ? $args['ADMIN_PASSWORD'] : null; }
protected function init($args) { parent::init($args); if (isset($args['HOST'])) { $this->setHost($args['HOST']); } $this->port = isset($args['PORT']) ? $args['PORT'] : 389; $this->searchBase = isset($args['SEARCH_BASE']) ? $args['SEARCH_BASE'] : ''; $this->adminDN = isset($args['ADMIN_DN']) ? $args['ADMIN_DN'] : null; $this->adminPassword = isset($args['ADMIN_PASSWORD']) ? $args['ADMIN_PASSWORD'] : null; $this->searchTimelimit = isset($args['SEARCH_TIMELIMIT']) ? $args['SEARCH_TIMELIMIT'] : 30; $this->readTimelimit = isset($args['READ_TIMELIMIT']) ? $args['READ_TIMELIMIT'] : 30; if (isset($args['SORTFIELDS']) && is_array($args['SORTFIELDS'])) { $this->sortFields = $args['SORTFIELDS']; } }