Changeset View
Changeset View
Standalone View
Standalone View
lib/Auth/LDAP.php
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | public function __construct($domain = null) | ||||
if ($this->_ldap_scheme == "ldaps") { | if ($this->_ldap_scheme == "ldaps") { | ||||
$this->_ldap_port = 636; | $this->_ldap_port = 636; | ||||
} | } | ||||
else { | else { | ||||
$this->_ldap_port = 389; | $this->_ldap_port = 389; | ||||
} | } | ||||
} | } | ||||
$this->config_set("host", $this->_ldap_uri); | $this->config_set("host", parse_url($this->_ldap_uri, PHP_URL_HOST)); | ||||
$this->config_set("port", $this->_ldap_port); | $this->config_set("port", $this->_ldap_port); | ||||
$this->config_set("use_tls", $this->_ldap_scheme == 'tls'); | $this->config_set("use_tls", $this->_ldap_scheme == 'tls'); | ||||
parent::connect(); | parent::connect(); | ||||
// Attempt to get the root dn from the configuration file. | // Attempt to get the root dn from the configuration file. | ||||
$root_dn = $this->conf->get($this->domain, "base_dn"); | $root_dn = $this->conf->get($this->domain, "base_dn"); | ||||
if (empty($root_dn)) { | if (empty($root_dn)) { | ||||
▲ Show 20 Lines • Show All 1,390 Lines • Show Last 20 Lines |