diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2013-04-07 12:18:55 -0700 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2013-04-07 12:18:55 -0700 |
commit | 33f1e87c050a2dd2dc2b06de5d9050b16bd1f0c0 (patch) | |
tree | 2501f235a901cf81ccc0f35faa41885601f07517 /inc/auth.php | |
parent | 0a820853f3a80ea553e4e7355e1ddb345ab542f5 (diff) | |
parent | 677274500465d1bf8bde7d755c5a8bf107411e4f (diff) | |
download | rpg-33f1e87c050a2dd2dc2b06de5d9050b16bd1f0c0.tar.gz rpg-33f1e87c050a2dd2dc2b06de5d9050b16bd1f0c0.tar.bz2 |
Merge pull request #199 from splitbrain/authcomp
backward compatibility for old authtype settings
Diffstat (limited to 'inc/auth.php')
-rw-r--r-- | inc/auth.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/inc/auth.php b/inc/auth.php index 68b6b438d..9f180fc94 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -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,'','',MSG_ADMINS_ONLY); + } } if(!isset($auth) || !$auth){ |