DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:logoutconvenience

Logout convenience

Compatible with DokuWiki

No compatibility info given!

plugin Display the page you were last on before logging out.

Last updated on
2006-10-29
Provides
Action

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with authentication, redirect

This plugin shows the previous page you were on ($_GET['id']) instead of the login form. You could of course edit function act_auth() manually :-D

Put this in lib/plugins/logoutconvenience/actions.php :

<?php
if(!defined('DOKU_INC')) die();
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'action.php');
 
class action_plugin_logoutconvenience extends DokuWiki_Action_Plugin {
	function getInfo(){
		return array(
			'author' => 'Flavius Aspra',
			'email'  => 'flavius.as@gmail.com',
			'date'   => '2006-10-29',
			'name'   => 'Logout convenience',
			'desc'   => 'Removes the annoying login form, showing the actual page.',
            'url'    => 'http://www.dokuwiki.org/plugin:logoutconvenience'
			);
	}
	function register(Doku_Event_Handler $controller) {
		$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'logoutconvenience');
	}
	//code from function act_auth() @ inc/actions.php
	function logoutconvenience(&$event,$param) {
		global $ID;
		global $ACT;
		global $INFO;
		//handle logout
		if($ACT=='logout'){
			$lockedby = checklock($ID); //page still locked?
			if($lockedby == $_SERVER['REMOTE_USER']) {
				unlock($ID); //try to unlock
			}
			auth_logoff();
			$INFO = pageinfo();
			$ACT = 'show';
		}
	}
}
?>

Hopefully someone will find it useful, it's my first DokuWiki plugin.

it is, merci
Thanks - Fred
plugin/logoutconvenience.txt · Last modified: 2013-11-02 02:32 by Klap-in