DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:logoutconvenience

Logout convenience Plugin

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

The missing download url means that this extension cannot be installed via the Extension Manager. Please see Publishing a Plugin on dokuwiki.org. Recommended are public repository hosts like GitHub, GitLab or Bitbucket.

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:

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'    => 'https://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: 2019-08-17 16:38 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki