From eac3177bc1570efba0a4dfd243592052a1bf1cf5 Mon Sep 17 00:00:00 2001 From: Inaki Date: Fri, 24 Sep 2010 12:46:46 +0000 Subject: [PATCH] auth/cas MDL-18643 CAS synchronization fails with Microsoft Active Directory The bug was fixed in LDAP auth plugin but was not applied to CAS auth too. Thanks to Jose Garcia for the bug report and proposed fix. --- auth/cas/auth.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/auth/cas/auth.php b/auth/cas/auth.php index ae0f17abaa8..f551c769c25 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -488,6 +488,9 @@ if ( !is_object($PHPCAS_CLIENT) ) { if (!empty($this->config->version)) { ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $this->config->version); } + 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;