fields['objects'] = array( "guid", "owner", "parent", "name", "created", "updated", "membModify", "membMemb", "membAccs", "membCres", "membModifys", "membMembs", "pubAcc", "pubAccs", "pubCres", "objtype", ); parent::__construct($guid); } /* * Get the owner of this object. Either a user object or a group * object will be returned. If this object does not have an owner, * NULL will be returned. */ public function getOwner() : agent { if (!isset($this->owner) || $this->owner == "") return NULL; $obj = new object($this->owner); if ($obj->objtype == "group") return new group($this->owner); return new user($this->owner); } /* * Get an array of all members of this object */ public function getMembers() : array { $memb = array(); $query = "SELECT member FROM members WHERE guid = '" . $this->db->esc($this->guid) . "'"; $res = $this->db->query($query); foreach ($res as $m) $memb[] = new user($m['member']); return $memb; } } ?>