Code Duplication    Length = 10-11 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 1004-1013 (lines=10) @@
1001
			$req->returnToUrl = $returnToUrl;
1002
			if ( $req instanceof UserDataAuthenticationRequest ) {
1003
				$status = $req->populateUser( $user );
1004
				if ( !$status->isGood() ) {
1005
					$status = Status::wrap( $status );
1006
					$session->remove( 'AuthManager::accountCreationState' );
1007
					$this->logger->debug( __METHOD__ . ': UserData is invalid: {reason}', [
1008
						'user' => $user->getName(),
1009
						'creator' => $creator->getName(),
1010
						'reason' => $status->getWikiText( null, null, 'en' ),
1011
					] );
1012
					return AuthenticationResponse::newFail( $status->getMessage() );
1013
				}
1014
			}
1015
		}
1016
@@ 1598-1608 (lines=11) @@
1595
			$this->getSecondaryAuthenticationProviders();
1596
		foreach ( $providers as $provider ) {
1597
			$status = $provider->testUserForCreation( $user, $source );
1598
			if ( !$status->isGood() ) {
1599
				$ret = Status::wrap( $status );
1600
				$this->logger->debug( __METHOD__ . ': Provider denied creation of {username}: {reason}', [
1601
					'username' => $username,
1602
					'reason' => $ret->getWikiText( null, null, 'en' ),
1603
				] );
1604
				$session->set( 'AuthManager::AutoCreateBlacklist', $status, 600 );
1605
				$user->setId( 0 );
1606
				$user->loadFromId();
1607
				return $ret;
1608
			}
1609
		}
1610
1611
		// Ignore warnings about master connections/writes...hard to avoid here