projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7569bd6
)
Framework: Fix LDAP finding user's DN (fixes authentication)
author
Ben Klang
<ben@alkaloid.net>
Wed, 2 Jun 2010 22:13:30 +0000
(18:13 -0400)
committer
Ben Klang
<ben@alkaloid.net>
Wed, 2 Jun 2010 22:17:39 +0000
(18:17 -0400)
framework/Auth/lib/Horde/Auth/Ldap.php
patch
|
blob
|
history
diff --git
a/framework/Auth/lib/Horde/Auth/Ldap.php
b/framework/Auth/lib/Horde/Auth/Ldap.php
index
6e11b96
..
0f20dcc
100644
(file)
--- 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. */