37 $session = SessionManager::getGlobalSession();
41 $session->unpersist();
46 if ( !$session->canSetUser() ) {
49 'cannotlogoutnow-text',
50 $session->getProvider()->describe( $this->getErrorFormatter()->getLanguage() )
58 if ( $user->isAnon() ) {
60 $this->
addWarning(
'apierror-mustbeloggedin-generic',
'notloggedin' );
64 $oldName = $user->getName();
69 $this->
getHookRunner()->onUserLogoutComplete( $user, $injected_html, $oldName );
97 'action=logout&token=123ABC'
98 =>
'apihelp-logout-example-logout',
103 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Logout';
108class_alias( ApiLogout::class,
'ApiLogout' );
array $params
The job parameters.