Skip to content

Commit

Permalink
backward compatibility for old authtype settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bug authored and splitbrain committed Mar 17, 2013
1 parent 8b5e2fd commit e71b0ef
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions inc/auth.php
Expand Up @@ -48,10 +48,15 @@ function auth_setup() {

// try to load auth backend from plugins
foreach ($plugin_controller->getList('auth') as $plugin) {
if ($conf['authtype'] === $plugin) {
$auth = $plugin_controller->load('auth', $plugin);
break;
}
if ($conf['authtype'] === $plugin) {
$auth = $plugin_controller->load('auth', $plugin);
break;
} elseif ('auth' . $conf['authtype'] === $plugin) {
// matches old auth backends (pre-Weatherwax)
$auth = $plugin_controller->load('auth', $plugin);
msg('Your authtype setting is deprecated. You must set $conf[\'authconfig\'] = ' . "auth" . $conf['authtype']
. ' in your config (see <a href="https://www.dokuwiki.org/auth">Authentication Backends</a>)',-1);
}
}

if(!isset($auth) || !$auth){
Expand Down

0 comments on commit e71b0ef

Please sign in to comment.