summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/CGI.pl b/CGI.pl
index 2069d9235..9ff485265 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -280,6 +280,7 @@ sub GetUserInfo {
my %user;
my @queries;
my %groups;
+ my @groupids;
# No info if not logged in
return \%user if ($userid == 0);
@@ -304,16 +305,18 @@ sub GetUserInfo {
$user{'canblessany'} = UserCanBlessAnything();
- SendSQL("SELECT name FROM groups, user_group_map " .
+ SendSQL("SELECT DISTINCT id, name FROM groups, user_group_map " .
"WHERE groups.id = user_group_map.group_id " .
"AND user_id = $userid " .
"AND NOT isbless");
while (MoreSQLData()) {
- my ($name) = FetchSQLData();
+ my ($id, $name) = FetchSQLData();
+ push(@groupids,$id);
$groups{$name} = 1;
}
$user{'groups'} = \%groups;
+ $user{'groupids'} = \@groupids;
return \%user;
}