From f433f7ce774d977466891a9e432dc722a2dde536 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 6 Aug 2012 11:42:32 +0200 Subject: [PATCH] if parameters are not 0, null then limit will be PROFILES_PER_PAGE If you look at classes/User_group.php on line 412 in the current code, you can see that a call to $profile->getGroups() is made. This implies getGroups($offset=0, $limit=PROFILES_PER_PAGE) only giving a limited amount of groups. This means only the first 20 groups in an ascending numerical order by locally stored User_group->id will be addressable with the bangtag syntax. I solved this by making the getGroups() call to the same one made in Profile->isMember(), i.e. $profile->getGroups(0, null); --- classes/User_group.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/User_group.php b/classes/User_group.php index 406537dd8a..1ec2b09ae8 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -409,7 +409,7 @@ class User_group extends Managed_DataObject // Are there any matching remote groups this profile's in? if ($profile) { - $group = $profile->getGroups(); + $group = $profile->getGroups(0, null); while ($group->fetch()) { if ($group->nickname == $nickname) { // @fixme is this the best way?