Get information about a player.

@param string $login
@param bool   $forceNew

@return Player
352068
public function getPlayerInfo($login, $forceNew = false)
    {
        if (!isset($this->online[$login]) || $forceNew) {
            // to make sure even if an exception happens, player has login and basic nickname
            $playerInformation = new PlayerInfo();
            $playerInformation->login = $login;
            $playerDetails = new PlayerDetailedInfo();
            $playerDetails->nickName = $login;

            try {
                //fetch additional informations
                $playerInformation = $this->factory->getConnection()->getPlayerInfo($login);
                $playerDetails = $this->factory->getConnection()->getDetailedPlayerInfo($login);
            } catch (InvalidArgumentException $e) {
                $this->logger->error("Login unknown: $login", ["exception" => $e]);
                $this->console->writeln('$f00Login Unknown: '.$login.' dedicated server said: $fff'.$e->getMessage());
            } catch (FaultException $ex) {
                $this->logger->error("Login unknown: $login", ["exception" => $ex]);
                $this->console->writeln('$f00Login Unknown: '.$login.' dedicated server said: $fff'.$ex->getMessage());
            }
            return $this->playerFactory->createPlayer($playerInformation, $playerDetails);
        }

        return $this->online[$login];
    }
1276317
public function getUserByLogin(string $login)
    {
        $retval = null;

        if (strlen($login) > 0) {
            $nb_user = CNabuUser::findByLogin($this, $login);
            if ($nb_user instanceof CNabuUser && $nb_user->validateCustomer($this)) {
                $nb_user->setCustomer($this);
                $retval = $nb_user;
            }
        }

        return $retval;
    }
246947
private function getIgnoredStatus($login)
    {
        try {
            $ignoreList = $this->factory->getConnection()->getIgnoreList();
            foreach ($ignoreList as $player) {
                if ($player->login === $login) {
                    return true;
                }
            }

            return false;
        } catch (\Exception $e) {
            return false;
        }
    }
1194619
public static function get($key, $child = null, $forceNew = false)
    {
        $container = static::getContainer($child);

        return $container->get($key, $forceNew);
    }
800046
public function login($login, $password, $remindme = true)
  {
    $this->user = $this->findUser($login, $password);

    return $this->user
      ? $this->saveToken($remindme)
      : false;
  }
106801
public function getFromLogin( $login){
        $rest = $this->getService( self::API_VPN_USER . $login);
        $rest->GET();

        return $rest->getResult( models\VPN\Server\User::class);
    }
1278021
public function getLanguageForUser($login)
    {
        if ($login == 'anonymous') {
            return false;
        }

        Piwik::checkUserHasSuperUserAccessOrIsTheUser($login);

        $lang = $this->getModel()->getLanguageForUser($login);

        return $lang;
    }
893240
protected static function changePasswordBySecurityAnswerWithUsername($username, $answer, $newPassword, $login)
    {
        return static::changePasswordBySecurityAnswer(
            static::getEmailByUsername($username),
            $answer,
            $newPassword,
            $login
        );
    }
1173085
public function findByLogin($login)
    {
        $playerQuery = PlayerQuery::create();
        $player = $playerQuery->findOneByLogin($login);

        PlayerTableMap::clearInstancePool();
        return $player;
    }
32031
public function getOauthClient($forceNew = false)
    {
        if ( ! isset($this->instances[self::CLIENT_OAUTH]) || $forceNew) {
            $this->instances[self::CLIENT_OAUTH] = MeetupOAuthClient::factory($this->getUpdatedOauthConfig());
        }

        return $this->instances[self::CLIENT_OAUTH];
    }
42498
public function connection($config = null, $forceConnect = false)
    {

        if ($this->connection && !$forceConnect) {
            return $this->connection;
        }

        !isset($config) || $this->config($config);

        $ref = new \ReflectionClass($this->getHandler());

        try {
            /** @var \PDO $connection */
            $this->connection = $ref->newInstanceArgs([
                $this->getConnectionString(),
                $this->getUser(),
                $this->getPassword(),
                $this->getHandlerOptions()
            ]);
        } catch (\PDOException $e) {
            throw new DatabaseException($e->getMessage());
        }

        return $this->connection;
    }
500333
public function getPlayerMapRecords($mapUid, $nbLaps, $logins)
    {
        $query = new RecordQuery();
        $query->filterByMapuid($mapUid);
        $query->filterByNblaps($nbLaps);
        $query->filterByPlayerLogins($logins);

        $result = $query->find();
        $result->populateRelation('Player');
        RecordTableMap::clearInstancePool();

        return $result->getData();
    }
1047700
final function removePlayerFromPlayerList($login)
	{
		Windows\PlayerList::Erase($login);
		$playerLists = Windows\PlayerList::GetAll();
		foreach($playerLists as $playerList)
		{
			$playerList->removePlayer($login);
		}
		Windows\PlayerList::RedrawAll();
	}
659328
public function getConnection($login) {

        if (isset($this->servers[$login])) {
            if (!isset($this->connections[$login])) {
                $conf = $this->servers[$login];
                $this->connections[$login] = Connection::factory($conf['host'], $conf['port'], 1, $conf['user'], $conf['password']);
            }

            return $this->connections[$login];
        }
        return null;
    }
310423
public function findByLogin($login)
	{
		$model = $this->createModel();

		$user = $model->where($model->getLoginName(), '=', $login)->find();

		if ( ! $user->loaded() )
		{
			throw new UserNotFoundException("A user could not be found with a login value of [$login].");
		}

		return $user;
	}
1278005
private function getLogins($players, $allowEmpty = false)
    {
        if (is_array($players)) {
            $logins = array();
            foreach ($players as $player) {
                $login = $this->getLogin($player);
                if ($login === false) {
                    return false;
                }
                $logins[] = $login;
            }

            return implode(',', $logins);
        }
        return $this->getLogin($players, $allowEmpty);
    }
259068
public function getCampaignsByLogin($login)
    {
        $resource = 'campaigns/by_login/' . $login . '.json';

        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));

        $decodedResponseBody = $this->getDecodedBody($response->getBody());

        $getCampaignsResponse = new Models\GetCampaignsResponse($decodedResponseBody);
        return $getCampaignsResponse->getCampaigns();
    }