From b4245126d64b378a4cb90821718983e27e943ebc Mon Sep 17 00:00:00 2001 From: Jan Schumann Date: Tue, 3 Jan 2012 02:46:36 +0100 Subject: Load auth types from plugins in settings_authtype class --- lib/plugins/config/settings/extra.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/plugins') 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; -- cgit v1.2.3