Ejemplo n.º 1
0
 /**
  * Saves the user data for the profile.
  *
  * @return Bengine_Game_Model_Profile
  */
 protected function _afterSave()
 {
     if ($this->getUserId()) {
         if ($this->getIsNew()) {
             Core::getQuery()->insert("profile2user", array("profile_id" => $this->getProfileId(), "user_id" => $this->getUserId(), "data" => $this->getData()));
         } else {
             Core::getQuery()->update("profile2user", array("data" => $this->getData()), "profile_id = ? AND user_id = ?", array($this->getProfileId(), $this->getUserId()));
         }
     }
     return parent::_afterSave();
 }
Ejemplo n.º 2
0
 /**
  * (non-PHPdoc)
  * @see app/code/Bengine/Model/Bengine_Game_Model_Abstract#_afterSave()
  * TODO
  */
 protected function _afterSave()
 {
     $this->set("data", unserialize($this->get("data")));
     return parent::_afterSave();
 }