diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-07-29 15:27:05 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-07-29 15:27:05 (GMT) |
commit | 63439f9f734710f9f96523a9cbb8bb9728b4647d (patch) | |
tree | afd48cd678b826e581d3501753fdf769fdea8cd0 /lib/RHRD/rddb.pm | |
parent | b865b96be37a6a48a4618b5bc24dbea3c6bfe311 (diff) |
honoring special groups on add/remove group members
Diffstat (limited to 'lib/RHRD/rddb.pm')
-rwxr-xr-x | lib/RHRD/rddb.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm index 68d8aaa..c209f81 100755 --- a/lib/RHRD/rddb.pm +++ b/lib/RHRD/rddb.pm @@ -548,7 +548,7 @@ sub get_user_groups { my ($ctx, $username) = @_; - my $sql = qq{select GROUP_NAME from USER_PERMS where USER_NAME = ? oder by GROUP_NAME;}; + my $sql = qq{select GROUP_NAME from USER_PERMS where USER_NAME = ? order by GROUP_NAME;}; my $sth = $ctx->{'dbh'}->prepare($sql) or return (undef, 'ERROR', "Database Error: " . $ctx->{'dbh'}->errstr); @@ -818,7 +818,7 @@ sub add_group_member ($cnt, my $result, my $errostring) = is_group_member($ctx, $groupname, $username); if($cnt > 0) { - return (undef, 'ERROR', "already a member"); + return (0, 'OK', "already a member"); } $sql = qq{insert into USER_PERMS (GROUP_NAME, USER_NAME) values (?, ?);}; |