summaryrefslogtreecommitdiff
path: root/lib/RHRD/rddb.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/RHRD/rddb.pm')
-rwxr-xr-xlib/RHRD/rddb.pm22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm
index f8832d1..8fc2b3c 100755
--- a/lib/RHRD/rddb.pm
+++ b/lib/RHRD/rddb.pm
@@ -321,7 +321,7 @@ sub get_fullname
return ($fullname, 'OK', 'success');
}
-sub get_users
+sub list_users
{
my ($dbh) = @_;
@@ -606,6 +606,26 @@ sub remove_group_member
return ($cnt, 'OK', "success");
}
+sub list_groups
+{
+ my ($dbh) = @_;
+
+ my $sql = qq{select NAME from GROUPS order by DEFAULT_LOW_CART;};
+ my $sth = $dbh->prepare($sql)
+ or return (undef, 'ERROR', "Database Error: " . $dbh->errstr);
+
+ $sth->execute()
+ or return (undef, 'ERROR', "Database Error: " . $sth->errstr);
+
+ my @groups;
+ while(my ($group) = $sth->fetchrow_array()) {
+ push @groups, $group;
+ }
+ $sth->finish();
+
+ return @groups;
+}
+
########################### SHOW handling ###########################
sub get_showtitle_and_log