Skip to content
Snippets Groups Projects
Commit 8257d713 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

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
parent 14642325
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment