コード例 #1
0
ファイル: user.inc.php プロジェクト: jgrancell/blackbriar
 public function updateSSOCharacter($userid, $characterID)
 {
     /** Saving our passthroughs to the user object */
     $this->_userID = $userid;
     $this->_characterID = $characterID;
     /** Getting the character information from the SSO token */
     $eve = new Eve($this->_db);
     $characterAffiliation = $eve->getCharacterAffiliation($this->getCharacterID());
     $this->_corporationID = $characterAffiliation->corporationID;
     $this->_allianceID = $characterAffiliation->allianceID;
     /** Adding the SSO character to the database */
     $stmt_add_character = $this->_db->prepare('INSERT INTO user_characters (userid,character_id,corporation_id,alliance_id,sso_character,key_keyid) ' . 'VALUES (?,?,?,?,?,?) ON DUPLICATE KEY UPDATE corporation_id=VALUES(corporation_id),alliance_id=VALUES(alliance_id)');
     $stmt_add_character->execute(array($this->getUserID(), $this->getCharacterID(), $this->getCorporationID(), $this->getAllianceID(), 1, null));
 }