diff options
Diffstat (limited to '')
| -rw-r--r-- | app/class/obj.class.php | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/app/class/obj.class.php b/app/class/obj.class.php index 5be9ac3..4e44649 100644 --- a/app/class/obj.class.php +++ b/app/class/obj.class.php @@ -144,12 +144,17 @@ class obj extends table      }      /* -     * Get an array of all members of this object +     * Get an array of all members of this object.  Limit of zero +     * returns all members.       */ -    public function getMembers() : array +    public function getMembers(int $limit = 0) : array      {          $memb = array();          $query = "SELECT member FROM members WHERE guid = '" . database::esc($this->guid) . "'"; + +        if ($limit != 0) +            $query .= " LIMIT " . database::esc($limit); +          $res = database::query($query);          foreach ($res as $m) | 
