Source: site.view [edit]
Function name: mygroups
Arguments:
Description: Lists all groups you belong to
Page type: webl
Render function:   groupsRender
Module: site

Page source:

var who = wubinfo.user;
if Size(OPTIONALARGS) == 1 then
   who = OPTIONALARGS[0]
end;
var groupMembers = Wub_GroupsMembers();
var res = [];

every group in ToList(groupMembers) do
   if who member ToList(groupMembers[group]) then
      res = res + [group]
   end
end;
res;