summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-06-16 14:29:24 -0700
committerZach Copley <zach@status.net>2010-06-16 14:29:24 -0700
commitd3d499879c4d01bde46033a3a98f9190ea18cb63 (patch)
tree21d057a2e7d188b44239a1883a30248bfe0b2aac /classes
parent327ed5b87e492380bc651ed03159ae7cd3a4a493 (diff)
- More useful group info from api/statusnet/group/show
- Add statusnet:group_info tag to group Atom feeds
Diffstat (limited to 'classes')
-rw-r--r--classes/User_group.php15
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 =