diff options
author | Guy Brand <gb@unistra.fr> | 2013-05-10 14:35:28 +0200 |
---|---|---|
committer | Guy Brand <gb@unistra.fr> | 2013-05-10 14:35:28 +0200 |
commit | 83f133d10eda8c1c6b6429c08b2d0722ca88ca17 (patch) | |
tree | 0377662d2335a0e2160175d5be3b95a92f6bb332 /lib/plugins/authldap/auth.php | |
parent | bc250e0ee2ec4fba891b53aa4f1814ce648ac71a (diff) | |
parent | 2a5a1456564635ddbca06edbc902e7f820d2a97b (diff) | |
download | rpg-83f133d10eda8c1c6b6429c08b2d0722ca88ca17.tar.gz rpg-83f133d10eda8c1c6b6429c08b2d0722ca88ca17.tar.bz2 |
Merge branch master into stable
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; } |