From eec0b4d3db417bebeaecec8b9dba5612744b6e0c Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 20 Sep 2010 18:35:59 +0200 Subject: [PATCH] Re-bind as user if requested. --- framework/Core/lib/Horde/Core/Factory/Ldap.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/Core/lib/Horde/Core/Factory/Ldap.php b/framework/Core/lib/Horde/Core/Factory/Ldap.php index c73bfe0ba..11a983dd9 100644 --- a/framework/Core/lib/Horde/Core/Factory/Ldap.php +++ b/framework/Core/lib/Horde/Core/Factory/Ldap.php @@ -84,6 +84,11 @@ class Horde_Core_Factory_Ldap try { $this->_instances[$sig] = new Horde_Ldap($config); + if (isset($config['bindas']) && $config['bindas'] == 'user') { + $this->_instances[$sig]->bind( + $this->_instances[$sig]->findUserDN($GLOBALS['registry']->getAuth()), + $GLOBALS['registry']->getAuthCredential('password')); + } } catch (Horde_Exception $e) { if ($pushed) { $GLOBALS['registry']->popApp(); -- 2.11.0