function synchMemberByID($server, $memberId = 0, $memberName = false, $region = false, $guildId = 0) { global $addon, $roster, $update; $this->server = $server; $this->memberId = $memberId; $this->memberName = $memberName; $roster->data['region'] = $region; $this->guildId = $guildId; //aprint($this->data); $this->_getRosterData(); if ($this->status['characterInfo']) { include_once ROSTER_LIB . 'update.lib.php'; $update = new update(); $update->fetchAddonData(); //echo'<pre>'; //print_r($this->data); //echo '</pre>'; $update->uploadData['wowrcp']['cpProfile'][$this->server]['Character'][$this->data['Name']] = $this->data; $this->message = $update->processMyProfile(); $tmp = explode("\n", $this->message); $this->message = implode('', $tmp); if (strpos($this->message, sprintf($roster->locale->act['upload_data'], $roster->locale->act['char'], $memberName, $server, $region))) { $this->_debug(1, true, 'Synced armory data for ' . $this->memberName . ' with roster', 'OK'); return true; } else { $this->_debug(1, false, 'Synced armory data for ' . $this->memberName . ' with roster', 'Failed'); return false; } } else { $this->message = "No infos for " . $this->memberName . "<br>Character has probalby not been updated for a while"; $this->_debug(1, false, 'Synced armory data ' . $this->memberName . ' with roster', 'Failed'); return false; } }