Browse files

MDL-10921 LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS o…

…ption set; backported from HEAD
  • Loading branch information...
1 parent bf5cc25 commit 68d924ce8a3be374b4fa8b8bc07c609fa2d90db2 iarenaza committed Sep 25, 2007
Showing with 5 additions and 0 deletions.
  1. +5 −0 auth/ldap/lib.php
View
5 auth/ldap/lib.php
@@ -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;

0 comments on commit 68d924c

Please sign in to comment.