From f6c80923bf250ef523282c47e061c442a6bf5860 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 29 Aug 2007 20:42:41 +0000 Subject: [PATCH] MDL-10921 LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set --- auth/ldap/auth.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index ec0ceb1809..7e886b0c23 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -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; -- 2.39.5