diff options
author | Jan Schumann <js@schumann-it.com> | 2012-01-03 02:46:36 +0100 |
---|---|---|
committer | Jan Schumann <js@schumann-it.com> | 2012-01-03 02:46:36 +0100 |
commit | b4245126d64b378a4cb90821718983e27e943ebc (patch) | |
tree | 51a31e142fea014470a6d99e0ab29fa482b01c62 /lib/plugins | |
parent | 4ae475af3d062ad634677a93371703eadbfdf256 (diff) | |
download | rpg-b4245126d64b378a4cb90821718983e27e943ebc.tar.gz rpg-b4245126d64b378a4cb90821718983e27e943ebc.tar.bz2 |
Load auth types from plugins in settings_authtype class
Diffstat (limited to 'lib/plugins')
-rw-r--r-- | lib/plugins/config/settings/extra.class.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index b4e35b1cc..72b9755be 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -43,12 +43,19 @@ if (!class_exists('setting_authtype')) { class setting_authtype extends setting_multichoice { function initialize($default,$local,$protected) { + global $plugin_controller; // populate $this->_choices with a list of available auth mechanisms $authtypes = glob(DOKU_INC.'inc/auth/*.class.php'); $authtypes = preg_replace('#^.*/([^/]*)\.class\.php$#i','$1', $authtypes); $authtypes = array_diff($authtypes, array('basic')); - sort($authtypes); + + // retrive auth types provided by plugins + foreach ($plugin_controller->getList('auth') as $plugin) { + $authtypes = $plugin; + } + + $authtypes = array_unique($authtypes); $this->_choices = $authtypes; |