Code Duplication    Length = 8-8 lines in 2 locations

includes/auth/AuthManager.php 2 locations

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