Merge pull request #162 from nexeck/master
D3004 Add LDAP Referrals Option
This commit is contained in:
@@ -655,6 +655,11 @@ return array(
|
||||
|
||||
// The LDAP version
|
||||
'ldap.version' => 3,
|
||||
|
||||
// LDAP Referrals Option
|
||||
// Whether referrals should be followed by the client
|
||||
// Should be set to 0 if you use Windows 2003 AD
|
||||
'ldap.referrals' => 1,
|
||||
|
||||
// -- Disqus OAuth ---------------------------------------------------------- //
|
||||
|
||||
|
||||
@@ -49,6 +49,10 @@ final class PhabricatorLDAPProvider {
|
||||
public function getLDAPVersion() {
|
||||
return PhabricatorEnv::getEnvConfig('ldap.version');
|
||||
}
|
||||
|
||||
public function getLDAPReferrals() {
|
||||
return PhabricatorEnv::getEnvConfig('ldap.referrals');
|
||||
}
|
||||
|
||||
public function retrieveUserEmail() {
|
||||
return $this->userData['mail'][0];
|
||||
@@ -97,6 +101,8 @@ final class PhabricatorLDAPProvider {
|
||||
|
||||
ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION,
|
||||
$this->getLDAPVersion());
|
||||
ldap_set_option($this->connection, LDAP_OPT_REFERRALS,
|
||||
$this->getLDAPReferrals());
|
||||
}
|
||||
|
||||
return $this->connection;
|
||||
|
||||
Reference in New Issue
Block a user