45 parent::__construct(
'Userlogout' );
70 if ( $user->isAnon() ) {
75 $this->oldUserName = $user->getName();
77 parent::execute(
$par );
83 $this->
getUser()->isTemp() ?
'userlogout-temp' :
'userlogout-continue'
98 $session = SessionManager::getGlobalSession();
99 if ( !$session->canSetUser() ) {
101 'cannotlogoutnow-title',
102 'cannotlogoutnow-text',
104 $session->getProvider()->describe( $this->getLanguage() )
116 $this->showSuccess();
121 $this->
getHookRunner()->onUserLogoutComplete( $this->
getUser(), $injected_html, $this->oldUserName );
122 $out->addHTML( $injected_html );
125 private function showSuccess() {
127 $this->
getRequest()->getValues(
'returnto',
'returntoquery' ) );
130 $out->addWikiMsg(
'logouttext', $loginURL );
132 $out->returnToMain();
148class_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.