33 return $this->
beginLinkAttempt( $user,
'AuthManager::accountCreationState' );
47 $session = $this->manager->getRequest()->getSession();
48 $state = $session->getSecret( $key );
49 if ( !is_array( $state ) ) {
53 $maybeLink = array_filter( $state[
'maybeLink'],
function ( $req ) use ( $user ) {
54 if ( !$req->action ) {
55 $req->action = AuthManager::ACTION_CHANGE;
57 $req->username = $user->getName();
58 return $this->manager->allowsAuthenticationDataChange( $req )->isGood();
67 wfMessage(
'authprovider-confirmlink-message' ),
91 $session = $this->manager->getRequest()->getSession();
92 $state = $session->getSecret( $key );
93 if ( !is_array( $state ) ) {
98 foreach ( $state[
'maybeLink'] as $linkReq ) {
99 $maybeLink[$linkReq->getUniqueId()] = $linkReq;
105 $state[
'maybeLink'] = [];
106 $session->setSecret( $key, $state );
110 foreach ( $req->confirmedLinkIDs as $id ) {
111 if ( isset( $maybeLink[$id] ) ) {
112 $req = $maybeLink[$id];
113 $req->username = $user->getName();
114 if ( !$req->action ) {
119 $status = $this->manager->allowsAuthenticationDataChange( $req );
120 $statuses[] = [ $req, $status ];
121 if ( $status->isGood() ) {
124 $this->manager->changeAuthenticationData( $req,
true );
134 $combinedStatus = \Status::newGood();
135 foreach ( $statuses as $data ) {
136 list( $req, $status ) = $data;
137 $descriptionInfo = $req->describeCredentials();
139 'authprovider-confirmlink-option',
140 $descriptionInfo[
'provider']->text(), $descriptionInfo[
'account']->text()
142 if ( $status->isGood() ) {
143 $combinedStatus->error(
wfMessage(
'authprovider-confirmlink-success-line', $description ) );
146 'authprovider-confirmlink-failed-line', $description, $status->getMessage()->text()
156 $combinedStatus->getMessage(
'authprovider-confirmlink-failed' ),
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...