Wondering if someone can point me in the right direction....


Active member
Pulling stats from an external source, I have every part working I need aside from one essential part which is causing me problems.

Has now changed to this:

This is pulled from one website into my database (the bottom example)

The problem is my site is looking for that blazeId which no longer exists, but I'm at my wits end trying to figure this out, the code that is causing me problems is the following.

            // check if the console cookie is set

            if (!$visitor->isLinked()){

                if(isset($_POST['player']) && strlen($_POST['player'])>3)
                    // check this player doesn't exist already
                    $pid = YFL_Rivals_Helpers_EA::getConsole(@$_COOKIE['console']);

                    $player = $this->_getPlayerModel()->getByName($_POST['player'], $pid);
                    if( ! $player)
                        // search the match stats for this gamertag to get the ea id
                        $eaId = 0;
                        $id = $this->_getPlayerModel()->getEAIdFromCache($_POST['player'], $pid);
                            // if found, add to query. if not dont worry, they will get linked when they play
                            $eaId = $id['player_ea_id'];

                        // create the player record for this platform
                        $db = XenForo_Application::get('db');
                        $query = sprintf("INSERT INTO xf_yfl_player (platform_id, ea_id, user_id, name) VALUES (%d, %d, %d, %s)", $pid, $eaId, $visitor->getUserId(), $db->quote($_POST['player']));

                        $viewParams = array(
                            "mode" => 'playerlinked',
                            "console" => @$_COOKIE['console']
I'm trying to figure out what I need to change to get the *playername* into the eaID instead of looking for the blazeId which no longer exists.

I know this is likely to go unanswered but thought I would try.