This is a follow-up task to 7bad38dc391635c574fe902a2e1b63c2c1cd1404. Currently Special:GlobalUsers passes '#' as the username for gender in groups. This seems wrong. This means that the group name listed will be the neutral version, even if the user selected masculine or feminine in their preferences.
You should modify GlobalUsersPager::getUserGroups to take a second parameter $userName . It should pass this parameter to UserGroupMembership::getLink as the fourth argument (instead of '#').
In GlobalUserPager::formatRow you should modify the call to $this->getUserGroups() to add a second parameter, which should be $row->gu_name