Code Duplication    Length = 8-8 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 1568-1575 (lines=8) @@
1565
		// Avoid account creation races on double submissions
1566
		$cache = \ObjectCache::getLocalClusterInstance();
1567
		$lock = $cache->getScopedLock( $cache->makeGlobalKey( 'account', md5( $username ) ) );
1568
		if ( !$lock ) {
1569
			$this->logger->debug( __METHOD__ . ': Could not acquire account creation lock', [
1570
				'user' => $username,
1571
			] );
1572
			$user->setId( 0 );
1573
			$user->loadFromId();
1574
			return Status::newFatal( 'usernameinprogress' );
1575
		}
1576
1577
		// Denied by providers?
1578
		$providers = $this->getPreAuthenticationProviders() +
@@ 1600-1607 (lines=8) @@
1597
		\Profiler::instance()->getTransactionProfiler()->resetExpectations();
1598
1599
		$backoffKey = wfMemcKey( 'AuthManager', 'autocreate-failed', md5( $username ) );
1600
		if ( $cache->get( $backoffKey ) ) {
1601
			$this->logger->debug( __METHOD__ . ': {username} denied by prior creation attempt failures', [
1602
				'username' => $username,
1603
			] );
1604
			$user->setId( 0 );
1605
			$user->loadFromId();
1606
			return Status::newFatal( 'authmanager-autocreate-exception' );
1607
		}
1608
1609
		// Checks passed, create the user...
1610
		$from = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : 'CLI';