43 parent::__construct(
'Userlogout' );
68 if ( $user->isAnon() ) {
73 $this->oldUserName = $user->getName();
75 parent::execute(
$par );
81 $this->
getUser()->isTemp() ?
'userlogout-temp' :
'userlogout-continue'
96 $session = SessionManager::getGlobalSession();
97 if ( !$session->canSetUser() ) {
99 'cannotlogoutnow-title',
100 'cannotlogoutnow-text',
102 $session->getProvider()->describe( $this->getLanguage() )
114 $this->showSuccess();
119 $this->
getHookRunner()->onUserLogoutComplete( $this->
getUser(), $injected_html, $this->oldUserName );
120 $out->addHTML( $injected_html );
123 private function showSuccess() {
125 $this->
getRequest()->getValues(
'returnto',
'returntoquery' ) );
128 $out->addWikiMsg(
'logouttext', $loginURL );
130 $out->returnToMain();
146class_alias( SpecialUserLogout::class,
'SpecialUserLogout' );
An error page which can definitely be safely rendered using the OutputPage.
Special page which uses an HTMLForm to handle processing.
string null $par
The sub-page of the special page.
Parent class for all special pages.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
getUser()
Shortcut to get the User executing this instance.
getRequest()
Get the WebRequest being used for this instance.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.