Code Duplication    Length = 10-11 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 1029-1038 (lines=10) @@
1026
			$req->returnToUrl = $returnToUrl;
1027
			if ( $req instanceof UserDataAuthenticationRequest ) {
1028
				$status = $req->populateUser( $user );
1029
				if ( !$status->isGood() ) {
1030
					$status = Status::wrap( $status );
1031
					$session->remove( 'AuthManager::accountCreationState' );
1032
					$this->logger->debug( __METHOD__ . ': UserData is invalid: {reason}', [
1033
						'user' => $user->getName(),
1034
						'creator' => $creator->getName(),
1035
						'reason' => $status->getWikiText( null, null, 'en' ),
1036
					] );
1037
					return AuthenticationResponse::newFail( $status->getMessage() );
1038
				}
1039
			}
1040
		}
1041
@@ 1583-1593 (lines=11) @@
1580
			$this->getSecondaryAuthenticationProviders();
1581
		foreach ( $providers as $provider ) {
1582
			$status = $provider->testUserForCreation( $user, $source );
1583
			if ( !$status->isGood() ) {
1584
				$ret = Status::wrap( $status );
1585
				$this->logger->debug( __METHOD__ . ': Provider denied creation of {username}: {reason}', [
1586
					'username' => $username,
1587
					'reason' => $ret->getWikiText( null, null, 'en' ),
1588
				] );
1589
				$session->set( 'AuthManager::AutoCreateBlacklist', $status, 600 );
1590
				$user->setId( 0 );
1591
				$user->loadFromId();
1592
				return $ret;
1593
			}
1594
		}
1595
1596
		// Ignore warnings about master connections/writes...hard to avoid here