52 $session = $this->manager->getRequest()->getSession();
53 $state = $session->getSecret( $key );
54 if ( !is_array( $state ) ) {
58 $maybeLink = array_filter( $state[
'maybeLink'],
function ( $req ) use ( $user ) {
59 if ( !$req->action ) {
60 $req->action = AuthManager::ACTION_CHANGE;
62 $req->username = $user->getName();
63 return $this->manager->allowsAuthenticationDataChange( $req )->isGood();
72 wfMessage(
'authprovider-confirmlink-message' ),
96 $session = $this->manager->getRequest()->getSession();
97 $state = $session->getSecret( $key );
98 if ( !is_array( $state ) ) {
103 foreach ( $state[
'maybeLink'] as $linkReq ) {
104 $maybeLink[$linkReq->getUniqueId()] = $linkReq;
110 $state[
'maybeLink'] = [];
111 $session->setSecret( $key, $state );
115 foreach ( $req->confirmedLinkIDs as $id ) {
116 if ( isset( $maybeLink[$id] ) ) {
117 $req = $maybeLink[$id];
118 $req->username = $user->getName();
119 if ( !$req->action ) {
124 $status = $this->manager->allowsAuthenticationDataChange( $req );
125 $statuses[] = [ $req, $status ];
126 if ( $status->isGood() ) {
129 $this->manager->changeAuthenticationData( $req,
true );
139 $combinedStatus = \MediaWiki\Status\Status::newGood();
140 foreach ( $statuses as [ $req, $status ] ) {
141 $descriptionInfo = $req->describeCredentials();
143 'authprovider-confirmlink-option',
144 $descriptionInfo[
'provider']->text(), $descriptionInfo[
'account']->text()
146 if ( $status->isGood() ) {
147 $combinedStatus->error(
wfMessage(
'authprovider-confirmlink-success-line', $description ) );
150 'authprovider-confirmlink-failed-line', $description, $status->getMessage()->text()
160 $combinedStatus->getMessage(
'authprovider-confirmlink-failed' ),
wfMessage( $key,... $params)
This is the function for getting translated interface messages.