diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/User_group.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/classes/User_group.php b/classes/User_group.php index 110f08301..e04c46626 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -154,6 +154,21 @@ class User_group extends Memcached_DataObject return $members; } + function getMemberCount() + { + // XXX: WORM cache this + + $members = $this->getMembers(); + $member_count = 0; + + /** $member->count() doesn't work. */ + while ($members->fetch()) { + $member_count++; + } + + return $member_count; + } + function getAdmins($offset=0, $limit=null) { $qry = |