@@ 1083-1092 (lines=10) @@ | ||
1080 | $req->returnToUrl = $returnToUrl; |
|
1081 | if ( $req instanceof UserDataAuthenticationRequest ) { |
|
1082 | $status = $req->populateUser( $user ); |
|
1083 | if ( !$status->isGood() ) { |
|
1084 | $status = Status::wrap( $status ); |
|
1085 | $session->remove( 'AuthManager::accountCreationState' ); |
|
1086 | $this->logger->debug( __METHOD__ . ': UserData is invalid: {reason}', [ |
|
1087 | 'user' => $user->getName(), |
|
1088 | 'creator' => $creator->getName(), |
|
1089 | 'reason' => $status->getWikiText( null, null, 'en' ), |
|
1090 | ] ); |
|
1091 | return AuthenticationResponse::newFail( $status->getMessage() ); |
|
1092 | } |
|
1093 | } |
|
1094 | } |
|
1095 | ||
@@ 1649-1659 (lines=11) @@ | ||
1646 | $this->getSecondaryAuthenticationProviders(); |
|
1647 | foreach ( $providers as $provider ) { |
|
1648 | $status = $provider->testUserForCreation( $user, $source, $options ); |
|
1649 | if ( !$status->isGood() ) { |
|
1650 | $ret = Status::wrap( $status ); |
|
1651 | $this->logger->debug( __METHOD__ . ': Provider denied creation of {username}: {reason}', [ |
|
1652 | 'username' => $username, |
|
1653 | 'reason' => $ret->getWikiText( null, null, 'en' ), |
|
1654 | ] ); |
|
1655 | $session->set( 'AuthManager::AutoCreateBlacklist', $status ); |
|
1656 | $user->setId( 0 ); |
|
1657 | $user->loadFromId(); |
|
1658 | return $ret; |
|
1659 | } |
|
1660 | } |
|
1661 | ||
1662 | $backoffKey = wfMemcKey( 'AuthManager', 'autocreate-failed', md5( $username ) ); |