public function getAuthors() { if (!$this->isInit()) { throw new Exception('AddonObject not init'); return; } $this->authors = json_decode($this->authorDat); if (!is_array($this->authors)) { //LEGACY SUPPORT if (!is_object($this->author)) { $author = new UserHandler(); $author->initFromBLID($this->authorDat); $this->author = $author; } $ad = array(); $auth = $ad[] = new stdClass(); $auth->id = $author->getId(); $auth->role = "main"; $auth->owner = true; $this->authorDat = json_encode($ad); $this->authors = $ad; // TODO do something here to send this back to the database } $this->authors = json_decode($this->authorDat); return $this->authors; }