'Fabian Bircher', 'email' => 'fabian@esn.org', 'date' => '2013-06-13', 'name' => 'plain CAS Plugin', 'desc' => 'Authenticate DokuWiki users via CAS', ); } function register (Doku_Event_Handler $controller) { $controller->register_hook ('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handle_login_form'); $controller->register_hook ('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); $controller->register_hook ('ACTION_ACT_PREPROCESS', 'AFTER', $this, 'handle_action_after'); $controller->register_hook ('TPL_ACT_UNKNOWN', 'BEFORE', $this, 'handle_template'); } function _self () { global $ID; return wl($ID, '', true, ''); } function _selfdo ($do) { global $ID; return wl($ID, 'do=' . $do, true, '&'); } function _redirect ($url) { header ('Location: ' . $url); exit; } function handle_login_form (&$event, $param) { global $auth; global $conf; global $lang; global $ID; if($conf['authtype'] == 'authplaincas') { if ($this->getConf('logourl') != '') { $caslogo = ' '; } else { $caslogo = ''; } //var_dump($event->data->_content); $event->data->_content = array(); // remove the login form $event->data->insertElement(0,'
'); //instead of removing, one could implement a local login here... // if ($this->getConf('jshidelocal')) { // $event->data->insertElement(3,'Only use this if you cannot use the '.$this->getConf('name').' above.
'); // $event->data->replaceElement(4,'