From: Ben Klang Date: Wed, 2 Jun 2010 22:13:30 +0000 (-0400) Subject: Framework: Fix LDAP finding user's DN (fixes authentication) X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7d98d3d8a87d9adfdf8470361275ab5f9d9b933d;p=horde.git Framework: Fix LDAP finding user's DN (fixes authentication) --- diff --git a/framework/Auth/lib/Horde/Auth/Ldap.php b/framework/Auth/lib/Horde/Auth/Ldap.php index 6e11b9698..0f20dccad 100644 --- a/framework/Auth/lib/Horde/Auth/Ldap.php +++ b/framework/Auth/lib/Horde/Auth/Ldap.php @@ -96,7 +96,9 @@ class Horde_Auth_Ldap extends Horde_Auth_Base throw new Horde_Auth_Exception('Empty result.'); } - return $search[0]['dn']; + $entry = $search->shiftEntry(); + + return $entry->currentDN(); } /** @@ -213,6 +215,7 @@ class Horde_Auth_Ldap extends Horde_Auth_Base protected function _authenticate($userId, $credentials) { /* Search for the user's full DN. */ + $this->_ldap->bind(); $dn = $this->_findDN($userId); /* Attempt to bind to the LDAP server as the user. */