diff options
author | Anika Henke <anika@selfthinker.org> | 2013-06-02 23:14:12 +0100 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2013-06-02 23:14:12 +0100 |
commit | 20beef63b4694afdc3d6c434c3d27c982b6a986b (patch) | |
tree | 9800833361010fe16a2f25a2b2e75a1b569f39f8 /lib/plugins/authldap/auth.php | |
parent | bc1e9ee1b1fffcb554afced8504270032c97341f (diff) | |
parent | 21c9604e66bcb42ab5267e9873738a6e22250103 (diff) | |
download | rpg-20beef63b4694afdc3d6c434c3d27c982b6a986b.tar.gz rpg-20beef63b4694afdc3d6c434c3d27c982b6a986b.tar.bz2 |
Merge remote-tracking branch 'origin/master' into loggedin-class
Diffstat (limited to 'lib/plugins/authldap/auth.php')
-rw-r--r-- | lib/plugins/authldap/auth.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 6e7bde1f0..b49aa4792 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -465,7 +465,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { if(defined('LDAP_OPT_NETWORK_TIMEOUT')) { ldap_set_option($this->con, LDAP_OPT_NETWORK_TIMEOUT, 1); } - $bound = @ldap_bind($this->con); + + if($this->getConf('binddn') && $this->getConf('bindpw')) { + $bound = @ldap_bind($this->con, $this->getConf('binddn'), $this->getConf('bindpw')); + $this->bound = 2; + } else { + $bound = @ldap_bind($this->con); + } if($bound) { break; } |