diff --git a/classes/Profile.php b/classes/Profile.php index 938c5357c2..3b3e43025b 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -350,6 +350,10 @@ class Profile extends Managed_DataObject self::cacheSet($keypart, implode(',', $ids)); } + if (!is_null($offset) && !is_null($limit)) { + $ids = array_slice($ids, $offset, $limit); + } + return User_group::multiGet('id', $ids); } diff --git a/lib/profileaction.php b/lib/profileaction.php index eaf515e04a..1bc1494557 100644 --- a/lib/profileaction.php +++ b/lib/profileaction.php @@ -259,7 +259,7 @@ class ProfileAction extends Action // TRANS: H2 text for user group membership statistics. $this->statsSectionLink('usergroups', _('Groups')); $this->text(' '); - $this->text($this->profile->getGroups()->N); + $this->text($this->profile->getGroups(0, null)->N); $this->elementEnd('h2'); if ($groups) {