From d3207d321237ce807247041cff7af0df4b56f42f Mon Sep 17 00:00:00 2001 From: Graham Cole <chckens@sucs.org> Date: Sat, 27 Feb 2010 11:43:10 +0000 Subject: [PATCH] commit someone's LDAP tweak, found on the live site --- lib/session.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/session.php b/lib/session.php index 9ba5c4f..a0f461c 100644 --- a/lib/session.php +++ b/lib/session.php @@ -250,7 +250,8 @@ private $datahash=''; // hash of data field private function ldap_getuser($ldap, $user) { // publically bind to find user - if (!($bind=@ldap_bind($ldap, "", ""))) { + ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3); + if (!($bind=@ldap_bind($ldap))) { trigger_error("LDAP bind failed", E_USER_ERROR); return NULL; } -- GitLab