getRequest()->getSessionData( 'oath_login' ); /** @var SpecialOATHDisable|SpecialOATHEnable|SpecialOATHLogin|SpecialPage $page */ $page = null; if ( $this->getUser()->isAnon() && $loginInfo !== null ) { // User is anonymous, so they are logging in $loginInfo = OATHAuthUtils::decryptSessionData( $loginInfo, $this->getRequest()->getSessionData( 'oath_uid' ) ); $page = new SpecialOATHLogin( $repo->findByUser( User::newFromName( $loginInfo['wpName'] ) ), new DerivativeRequest( $this->getRequest(), $loginInfo, $this->getRequest()->wasPosted() ) ); } else { $user = $repo->findByUser( $this->getUser() ); if ( $user->getKey() === null ) { $page = new SpecialOATHEnable( $repo, $user ); } else { $page = new SpecialOATHDisable( $repo, $user ); } } return $page; } protected function getGroupName() { return 'oath'; } }