private function getLogin($player, $allowEmpty = false)
    {
        if (is_object($player)) {
            if (property_exists($player, 'login')) {
                $player = $player->login;
            } else {
                return false;
            }
        }
        if (empty($player)) {
            return $allowEmpty ? '' : false;
        }
        if (is_string($player)) {
            return $player;
        }
        return false;
    }