]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10921 LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set
authorskodak <skodak>
Wed, 29 Aug 2007 20:42:41 +0000 (20:42 +0000)
committerskodak <skodak>
Wed, 29 Aug 2007 20:42:41 +0000 (20:42 +0000)
auth/ldap/auth.php

index ec0ceb180905b52cbdfd17a6b01a3b47a5dfc21c..7e886b0c235b2782104341f6082c26017d907c9c 100644 (file)
@@ -1485,6 +1485,11 @@ class auth_plugin_ldap extends auth_plugin_base {
                 ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $this->config->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;