summaryrefslogtreecommitdiff
path: root/lib/plugins/authad/auth.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-06-07 12:48:07 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-06-07 12:48:07 +0200
commit12d195ab7189878b41dc4d211befafc79ae402a6 (patch)
treee9de1f4118ae1e1b7bd3b0dee0209fbd5be7842f /lib/plugins/authad/auth.php
parent7482f2d6e43ea5768b2de40d89c7e7ea836a60df (diff)
downloadrpg-12d195ab7189878b41dc4d211befafc79ae402a6.tar.gz
rpg-12d195ab7189878b41dc4d211befafc79ae402a6.tar.bz2
treat empty AD credentials as NULL values FS#2781
Diffstat (limited to 'lib/plugins/authad/auth.php')
-rw-r--r--lib/plugins/authad/auth.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php
index b6b5dd268..fcbd2eeef 100644
--- a/lib/plugins/authad/auth.php
+++ b/lib/plugins/authad/auth.php
@@ -489,6 +489,11 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
$this->cando['modPass'] = false;
}
+ // adLDAP expects empty user/pass as NULL, we're less strict FS#2781
+ if(empty($opts['admin_username'])) $opts['admin_username'] = null;
+ if(empty($opts['admin_password'])) $opts['admin_password'] = null;
+
+ // user listing needs admin priviledges
if(!empty($opts['admin_username']) && !empty($opts['admin_password'])) {
$this->cando['getUsers'] = true;
} else {