Code Duplication    Length = 8-8 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 1583-1590 (lines=8) @@
1580
		// Avoid account creation races on double submissions
1581
		$cache = \ObjectCache::getLocalClusterInstance();
1582
		$lock = $cache->getScopedLock( $cache->makeGlobalKey( 'account', md5( $username ) ) );
1583
		if ( !$lock ) {
1584
			$this->logger->debug( __METHOD__ . ': Could not acquire account creation lock', [
1585
				'user' => $username,
1586
			] );
1587
			$user->setId( 0 );
1588
			$user->loadFromId();
1589
			return Status::newFatal( 'usernameinprogress' );
1590
		}
1591
1592
		// Denied by providers?
1593
		$providers = $this->getPreAuthenticationProviders() +
@@ 1615-1622 (lines=8) @@
1612
		\Profiler::instance()->getTransactionProfiler()->resetExpectations();
1613
1614
		$backoffKey = wfMemcKey( 'AuthManager', 'autocreate-failed', md5( $username ) );
1615
		if ( $cache->get( $backoffKey ) ) {
1616
			$this->logger->debug( __METHOD__ . ': {username} denied by prior creation attempt failures', [
1617
				'username' => $username,
1618
			] );
1619
			$user->setId( 0 );
1620
			$user->loadFromId();
1621
			return Status::newFatal( 'authmanager-autocreate-exception' );
1622
		}
1623
1624
		// Checks passed, create the user...
1625
		$from = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : 'CLI';