Index: TWiki.pm
===================================================================
--- TWiki.pm	(revision 13543)
+++ TWiki.pm	(working copy)
@@ -3618,14 +3618,27 @@
 sub _GROUPS {
     my ( $this, $params ) = @_;
 
-    my @groupNames = map {
-      '| [['.$_->webDotWikiName().  ']['.$_->wikiName().']] |'.
-        join(', ', map {
-            '[['.$_->webDotWikiName().']['.$_->wikiName().']]'
-        } @{$_->groupMembers()}). ' |';
-    } sort {$a->wikiName() cmp $b->wikiName()} @{$this->{users}->getAllGroups()};
+    my @groups = sort {$a->wikiName() cmp $b->wikiName()} @{$this->{users}->getAllGroups()};
+    my @table;
+    foreach my $group (@groups) {
+      my $groupName = $group->wikiName();
+      my $groupLink = "<nop>".$groupName;
+      $groupLink = '[['.$TWiki::cfg{UsersWebName}.".$groupName][$groupName]]" 
+      	if $this->{store}->topicExists($TWiki::cfg{UsersWebName}, $groupName);
 
-    return '| *Group* | *Members* |'."\n".join("\n", @groupNames);
+      my @members = sort {$a->wikiName() cmp $b->wikiName()} @{$group->groupMembers()};
+      my @userLinks;
+      foreach my $user (@members) {
+	my $userName = $user->wikiName();
+	my $userLink = "<nop>".$userName;
+	$userLink = '[['.$TWiki::cfg{UsersWebName}.".$userName][$userName]]" 
+	  if $this->{store}->topicExists($TWiki::cfg{UsersWebName}, $userName);
+	push @userLinks, $userLink;
+      }
+      push( @table, "| $groupLink | ".join(', ', @userLinks)." |");
+    }
+
+    return '| *Group* | *Members* |'."\n".join("\n", @table);
 }
 
 1;
