Skip to content
Snippets Groups Projects
Commit d32c54a1 authored by Julian's avatar Julian
Browse files

Update form events for Dokuwiki Igor compatability

parent 8318f35c
Branches igor-compat
No related tags found
No related merge requests found
......@@ -10,10 +10,23 @@ class action_plugin_authuffd extends DokuWiki_Action_Plugin
if($conf['authtype'] != 'authuffd')
return;
$conf['profileconfirm'] = false; /* password confirmation doesn't work with SSO users */
$controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handle_loginform');
$controller->register_hook('FORM_LOGIN_OUTPUT', 'BEFORE', $this, 'handle_loginform');
$controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handle_loginform_old');
}
function handle_loginform(Doku_Event &$event, $param)
function handle_loginform(Doku_Event &$event)
{
$form = $event->data;
do {
$form->removeElement(0);
} while ($form->elementCount() > 0);
$form->addFieldsetOpen('Login with:');
$form->setHiddenField('oauth2_login', '1');
$form->addButton('', $this->getConf('name'))->attr('type', 'submit');
$form->addFieldsetClose();
}
function handle_loginform_old(Doku_Event &$event, $param)
{
$event->data->_content = array(
form_openfieldset(array('_legend' => 'Login with:', 'class' => 'plugin_authuffd')),
......@@ -22,9 +35,4 @@ class action_plugin_authuffd extends DokuWiki_Action_Plugin
form_closefieldset()
);
}
function handle_dologin(Doku_Event &$event, $param)
{
msg('handle_dologin');
}
}
base authuffd
author Julian Rother
email julian@cccv.de
date 2022-02-19
date 2022-12-26
name Authentication with Uffd
desc Auth plugin for login via uffd
url https://git.cccv.de/uffd/dokuwiki-plugin-authuffd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment