15 parent::__construct(
'UnlinkAccounts' );
20 return 'UnlinkAccount';
24 return AuthManager::ACTION_UNLINK;
40 return $this->
getConfig()->get( MainConfigNames::RemoveCredentialsBlacklist );
48 if ( $this->authAction === AuthManager::ACTION_UNLINK ) {
50 $titleMessage = $this->
msg(
'cannotunlink-no-provider-title' );
51 $errorMessage = $this->
msg(
'cannotunlink-no-provider' );
65 if ( $status ===
false || !$status->isOK() ) {
71 $response = $status->getValue();
73 if ( $response->status === AuthenticationResponse::FAIL ) {
74 $this->
displayForm( StatusValue::newFatal( $response->message ) );
78 $status = StatusValue::newGood();
79 $status->warning( $this->
msg(
'unlinkaccounts-success' ) );
86 SessionManager::singleton()->invalidateSessionsForUser( $user );
87 $session->setUser( $user );
97 return Status::newGood( $response );
A special page subclass for authentication-related special pages.
isActionAllowed( $action)
Checks whether AuthManager is ready to perform the action.
performAuthenticationStep( $action, array $requests)
displayForm( $status)
Display the form.
loadAuth( $subPage, $authAction=null, $reset=false)
Load or initialize $authAction, $authRequests and $subPage.
string $subPage
Subpage of the special page.
getRequest()
Get the WebRequest being used for this instance.
trySubmit()
Attempts to do an authentication step with the submitted data.
An error page which can definitely be safely rendered using the OutputPage.
A class containing constants representing the names of configuration variables.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
getUser()
Shortcut to get the User executing this instance.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getConfig()
Shortcut to get main config object.
setAuthManager(AuthManager $authManager)
Set the injected AuthManager from the special page constructor.
getPageTitle( $subpage=false)
Get a self-referential title object.
__construct(AuthManager $authManager)
handleFormSubmit( $data)
Submit handler callback for HTMLForm.
execute( $subPage)
Default execute method Checks user permissions.
getGroupName()
Under which header this special page is listed in Special:SpecialPages.
isListed()
Whether this special page is listed in Special:SpecialPages.
getDefaultAction( $subPage)
Get the default action for this special page, if none is given via URL/POST data.
getRequestBlacklist()
Allows blacklisting certain request types.