Skip to content
Snippets Groups Projects
Commit b4245126 authored by Jan Schumann's avatar Jan Schumann
Browse files

Load auth types from plugins in settings_authtype class

parent 4ae475af
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
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