* @author Andreas Aakre Solberg, UNINETT, http://www.uninett.no * @author François Kooman * @author Thijs Kinkhorst, Universiteit van Tilburg * @author Jorge Hervás , Lukas Slansky * @license GPL2 http://www.gnu.org/licenses/gpl.html * @link https://github.com/pitbulk/dokuwiki-saml */ // must be run within Dokuwiki if (!defined('DOKU_INC')) die(); class action_plugin_authdiscourse extends DokuWiki_Action_Plugin { /** * Register event handlers */ public function register(Doku_Event_Handler $controller) { global $conf; if ($conf['authtype'] == 'authdiscourse') { $controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handle_login_form'); } } function handle_login_form(&$event, $param) { global $auth, $lang; $loginurl = $auth->getLoginURL(); // Replace the whole existing form as we can't handle username/password. $event->data->_content = array(); $event->data->insertElement(0, ''.$lang['btn_login'].''); } }