MDL-10921 LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set; backported from HEAD

This commit is contained in:
iarenaza
2007-09-25 21:05:57 +00:00
parent bf5cc256fd
commit 68d924ce8a
+5
View File
@@ -1338,6 +1338,11 @@ function auth_ldap_connect($binddn='',$bindpwd=''){
ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $CFG->ldap_version);
}
// Fix MDL-10921
if ($this->config->user_type == 'ad') {
ldap_set_option($connresult, LDAP_OPT_REFERRALS, 0);
}
if (!empty($binddn)){
//bind with search-user
//$debuginfo .= 'Using bind user'.$binddn.'and password:'.$bindpwd;