[rt-users] Members of group
Roman Steven
romansteve at gmail.com
Fri Mar 17 06:35:16 EST 2006
Hi,
Trying to determine if a user is part of a group. The following works fine
when the user is in the group but fails when not.
my $Name = "GroupName";
my $Groups = new RT::Groups($RT::SystemUser);
$Groups->LimitToUserDefinedGroups();
$Groups->Limit(FIELD => "Name", OPERATOR => "=", VALUE => "$Name");
$ggroups->WithMember(PrincipalId => $session{'CurrentUser'}->id,
Recusively => 0);
my $Groupid = $Groups->First->Id;
The above line is where it fails when user is not part of the group.
Also, not sure if Recusively => 0 is coded properly.
Any suggestions will be appreciated and thanks.
Roman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20060317/2cb5d29e/attachment.htm>
More information about the rt-users
mailing list