Changeset View
Changeset View
Standalone View
Standalone View
lib/Autodiscover.php
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | protected function init_ldap() | ||||
'domain_name_attribute' => $this->conf->get('ldap', 'domain_name_attribute'), | 'domain_name_attribute' => $this->conf->get('ldap', 'domain_name_attribute'), | ||||
)); | )); | ||||
$this->_ldap_domain = $this->conf->get('primary_domain'); | $this->_ldap_domain = $this->conf->get('primary_domain'); | ||||
// connect to LDAP | // connect to LDAP | ||||
if (!$this->ldap->connect()) { | if (!$this->ldap->connect()) { | ||||
$this->error("Storage connection failed"); | $this->error("Storage connection failed"); | ||||
return false; | |||||
} | } | ||||
// bind as the service user | // bind as the service user | ||||
if (!$this->ldap->bind($this->_ldap_bind_dn, $this->_ldap_bind_pw)) { | if (!$this->ldap->bind($this->_ldap_bind_dn, $this->_ldap_bind_pw)) { | ||||
$this->error("Storage connection failed"); | $this->error("Storage connection failed"); | ||||
return false; | |||||
} | } | ||||
return true; | |||||
} | } | ||||
/** | /** | ||||
* Find user in LDAP | * Find user in LDAP | ||||
*/ | */ | ||||
private function find_user($email, $domain) | private function find_user($email, $domain) | ||||
{ | { | ||||
$filter = $this->conf->get('login_filter'); | $filter = $this->conf->get('login_filter'); | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |