- function execute( $par ) {
- /**
- * Some satellite ISPs use broken precaching schemes that log people out straight after
- * they're logged in (T19790). Luckily, there's a way to detect such requests.
- */
- if ( isset( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], '&' ) !== false ) {
- wfDebug( "Special:UserLogout request {$_SERVER['REQUEST_URI']} looks suspicious, denying.\n" );
- throw new HttpError( 400, $this->msg( 'suspicious-userlogout' ), $this->msg( 'loginerror' ) );
+ public function isListed() {
+ return false;
+ }
+
+ protected function getGroupName() {
+ return 'login';
+ }
+
+ protected function getFormFields() {
+ return [];
+ }
+
+ protected function getDisplayFormat() {
+ return 'ooui';
+ }
+
+ public function execute( $par ) {
+ if ( $this->getUser()->isAnon() ) {
+ $this->setHeaders();
+ $this->showSuccess();
+ return;