wiki.techinc.nl/includes/SpecialUserlogout.php
Evan Prodromou 7a57bb56af Add an extension for logging MediaWiki events to the system logger
(syslog). Although intended to be useful, it's more of a testbed for
event hooks than anything else. For a first pass, started logging user
login and user logout events. Had to add hooks-running code to the
login and logout modules, but that's kind of the point. Documented the
three events added in hooks.doc.
2004-11-27 23:10:05 +00:00

27 lines
433 B
PHP

<?php
/**
*
* @package MediaWiki
* @subpackage SpecialPage
*/
/**
* constructor
*/
function wfSpecialUserlogout() {
global $wgUser, $wgOut, $returnto;
if (wfRunHooks('UserLogout', $wgUser)) {
$wgUser->logout();
$wgOut->mCookies = array();
$wgOut->setRobotpolicy( 'noindex,nofollow' );
$wgOut->addHTML( wfMsg( 'logouttext' ) );
$wgOut->returnToMain();
wfRunHooks('UserLogoutComplete', $wgUser);
}
}
?>