Go to the documentation of this file.
38 $session->unpersist();
43 if ( !$session->canSetUser() ) {
46 'cannotlogoutnow-text',
54 $oldName = $user->getName();
59 Hooks::run(
'UserLogoutComplete', [ &$user, &$injected_html, $oldName ] );
80 'action=logout&token=123ABC'
81 =>
'apihelp-logout-example-logout',
86 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Logout';
getExamplesMessages()
Returns usage examples for this module.
dieWithError( $msg, $code=null, $data=null, $httpCode=null)
Abort execution with an error.
getWebUITokenSalt(array $params)
Fetch the salt used in the Web UI corresponding to this module.
API module to allow users to log out of the wiki.
This abstract class implements many basic API functions, and is the base of all API classes.
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
isReadMode()
Indicates whether this module requires read rights.
mustBePosted()
Indicates whether this module must be called with a POST request.
getHelpUrls()
Return links to more detailed help pages about the module.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
needsToken()
Returns the token type this module requires in order to execute.
getErrorFormatter()
Get the error formatter.