diff options
Diffstat (limited to 'lib/plugins/authldap')
-rw-r--r-- | lib/plugins/authldap/auth.php | 8 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/fi/settings.php | 6 |
2 files changed, 13 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; } diff --git a/lib/plugins/authldap/lang/fi/settings.php b/lib/plugins/authldap/lang/fi/settings.php new file mode 100644 index 000000000..d3aa13e07 --- /dev/null +++ b/lib/plugins/authldap/lang/fi/settings.php @@ -0,0 +1,6 @@ +<?php +/** + * Finnish language file + * + * @author Otto Vainio <otto@valjakko.net> + */ |