summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/auth/ldap.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/inc/auth/ldap.php b/inc/auth/ldap.php
index 2f0f4f1ff..ef933a5eb 100644
--- a/inc/auth/ldap.php
+++ b/inc/auth/ldap.php
@@ -62,6 +62,16 @@ function auth_ldap_connect(){
}
}
}
+ //set deref mode
+ if($cnf['deref']){
+ if(!@ldap_set_option($LDAP_CONNECTION,
+ LDAP_OPT_DEREF,
+ $cnf['deref'])){
+ msg('Setting LDAP Deref mode '.$cnf['deref']. 'failed',-1);
+ if($cnf['debug'])
+ msg('LDAP errstr: '.htmlspecialchars(ldap_error($LDAP_CONNECTION)),0);
+ }
+ }
}
return $LDAP_CONNECTION;
}