summaryrefslogtreecommitdiff
path: root/classes/User_group.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-06-26 10:17:36 -0400
committerBrion Vibber <brion@pobox.com>2010-06-26 10:17:36 -0400
commit696e4ba393c658d5b2e1fe46e1389bd7b2cfdb34 (patch)
tree45c4f1512599175afea67f8a68e1b3ad66cace97 /classes/User_group.php
parent72e486a3226c9101f33bd86f953dbb9650c19fd1 (diff)
parentd9e56e15cc3174093fc994e524d1d9cf402ae8a3 (diff)
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts: plugins/OpenID/openidserver.php (cleaned up mismatched comment)
Diffstat (limited to 'classes/User_group.php')
-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 =