26 parent::__construct(
'UnlinkAccounts' );
31 return 'UnlinkAccount';
35 return AuthManager::ACTION_UNLINK;
59 if ( $this->authAction === AuthManager::ACTION_UNLINK ) {
61 $titleMessage = $this->
msg(
'cannotunlink-no-provider-title' );
62 $errorMessage = $this->
msg(
'cannotunlink-no-provider' );
76 if ( $status ===
false || !$status->isOK() ) {
82 $response = $status->getValue();
84 if ( $response->status === AuthenticationResponse::FAIL ) {
85 $this->
displayForm( StatusValue::newFatal( $response->message ) );
89 $status = StatusValue::newGood();
90 $status->warning( $this->
msg(
'unlinkaccounts-success' ) );
97 SessionManager::singleton()->invalidateSessionsForUser( $user );
98 $session->setUser( $user );
108 return Status::newGood( $response );
116class_alias( SpecialUnlinkAccounts::class,
'SpecialUnlinkAccounts' );
An error page which can definitely be safely rendered using the OutputPage.
A class containing constants representing the names of configuration variables.
const RemoveCredentialsBlacklist
Name constant for the RemoveCredentialsBlacklist setting, for use with Config::get()
A special page subclass for authentication-related special pages.
string $subPage
Subpage of the special page.
performAuthenticationStep( $action, array $requests)
displayForm( $status)
Display the form.
isActionAllowed( $action)
Checks whether AuthManager is ready to perform the action.
trySubmit()
Attempts to do an authentication step with the submitted data.
loadAuth( $subPage, $authAction=null, $reset=false)
Load or initialize $authAction, $authRequests and $subPage.
getRequest()
Get the WebRequest being used for this instance.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getUser()
Shortcut to get the User executing this instance.
setAuthManager(AuthManager $authManager)
Set the injected AuthManager from the special page constructor.
getPageTitle( $subpage=false)
Get a self-referential title object.
getConfig()
Shortcut to get main config object.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages By default the message key is the canonical name of...
Generic operation result class Has warning/error list, boolean status and arbitrary value.