summaryrefslogtreecommitdiffstats
path: root/application/libraries/Duser
diff options
context:
space:
mode:
authorRaphael Michel <mail@raphaelmichel.de>2018-07-22 11:50:02 +0200
committerRaphael Michel <mail@raphaelmichel.de>2018-07-23 09:10:53 +0200
commitf494eee4a3f9b0eb09f6f9d46fb2e6be40a116e6 (patch)
tree9e9de7722640e394062eabb5881adff29502c6bf /application/libraries/Duser
parentfdc375e9c503e9cb7bdb4754ad5cc9edc64e0220 (diff)
LDAP: Allow optional binding/authentication
Diffstat (limited to 'application/libraries/Duser')
-rw-r--r--application/libraries/Duser/drivers/Duser_ldap.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/application/libraries/Duser/drivers/Duser_ldap.php b/application/libraries/Duser/drivers/Duser_ldap.php
index b80385fe0..f30257364 100644
--- a/application/libraries/Duser/drivers/Duser_ldap.php
+++ b/application/libraries/Duser/drivers/Duser_ldap.php
@@ -26,6 +26,10 @@ class Duser_ldap extends Duser_Driver {
return false;
}
+ if (isset($config['bind_rdn']) && isset($config['bind_password'])) {
+ ldap_bind($ds, $config['bind_rdn'], $config['bind_password']);
+ }
+
switch ($config["scope"]) {
case "base":
$r = ldap_read($ds, $config['basedn'], $config["username_field"].'='.$username);