Call parent of doBatchLookups to get the LinkBatch for the userpages.
Use than the populated user group cache to get the groups from to
display them.
Follow-Up: I4a945f83ad28edf5cc040139943cf743cb3d133c
Change-Id: Ibbabf40d60dd9f8e3667cf17455e7582b4ee472a
}
function doBatchLookups() {
+ parent::doBatchLookups();
+
$uids = array();
foreach ( $this->mResult as $row ) {
$uids[] = $row->user_id;
// Note: This is a different loop than for user rights,
// because we're reusing it to build the group links
// at the same time
- foreach ( $user->getGroups() as $group ) {
+ $groups_list = self::getGroups( intval( $row->user_id ), $this->userGroupCache );
+ foreach ( $groups_list as $group ) {
if ( in_array( $group, $this->hideGroups ) ) {
return '';
}
/**
* @var array A array with user ids as key and a array of groups as value
*/
- private $userGroupCache;
+ protected $userGroupCache;
/**
* @param IContextSource $context