/** * Overload the data import, so that we can * evaluate the value of $notes to try to find the $user_id */ public function import_values($data) { //Default action first, actually import the data so we can work with it parent::import_values($data); //The api sent back the value notes_decoded - standardize it as an object if it has a value if (!is_null($this->notes_decoded)) { $this->notes_decoded = (object) $this->notes_decoded; //Success! if (isset($this->notes_decoded->user_id)) { $this->user_id = $this->notes_decoded->user_id; } } }