summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2013-04-25 16:05:53 +0200
committerAndreas Gohr <gohr@cosmocode.de>2013-04-25 16:05:53 +0200
commit8257d713a47c1819c2c33ddd2b868eea62d9f6fc (patch)
tree850584ea18947553489ba7ae539c0d0d6ddc3738 /lib
parent14642325892b50c3a95bead35efca7c5a6f16dc7 (diff)
downloadrpg-8257d713a47c1819c2c33ddd2b868eea62d9f6fc.tar.gz
rpg-8257d713a47c1819c2c33ddd2b868eea62d9f6fc.tar.bz2
authad: added compatibility for old option names
adLDAP renamed the ad_username and ad_password to admin_username admin_password recently. this makes our backend recognize the old settings
Diffstat (limited to 'lib')
-rw-r--r--lib/plugins/authad/auth.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php
index d6455c751..5d5f532b6 100644
--- a/lib/plugins/authad/auth.php
+++ b/lib/plugins/authad/auth.php
@@ -465,6 +465,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
$opts['domain_controllers'] = array_map('trim', $opts['domain_controllers']);
$opts['domain_controllers'] = array_filter($opts['domain_controllers']);
+ // compatibility with old option name
+ if(empty($opts['admin_username']) && !empty($opts['ad_username'])) $opts['admin_username'] = $opts['ad_username'];
+ if(empty($opts['admin_password']) && !empty($opts['ad_password'])) $opts['admin_password'] = $opts['ad_password'];
+
// we can change the password if SSL is set
if($opts['use_ssl'] || $opts['use_tls']) {
$this->cando['modPass'] = true;
@@ -472,7 +476,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
$this->cando['modPass'] = false;
}
- if(isset($opts['admin_username']) && isset($opts['admin_password'])) {
+ if(!empty($opts['admin_username']) && !empty($opts['admin_password'])) {
$this->cando['getUsers'] = true;
} else {
$this->cando['getUsers'] = false;