diff --git a/lib/session.php b/lib/session.php
index 9ba5c4fcbf2997d98597509f4e115bdd421c09ad..a0f461c1e2422678914ad27b767df140ae80028e 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;
 		}