Wikia

Request Tracker Wiki

GroupMembershipCheck

Comments0
856pages on
this wiki

There's probably a more stylish way, but this is a quick and dirty method that works fairly well.

% my $GroupObj = RT::Group->new( $session{ 'CurrentUser' } );
% my $PrincipalObj = RT::Principal->new( $session{ 'CurrentUser' } );
% $PrincipalObj->Load( $session{ 'CurrentUser' }->id );
% $GroupObj->LoadUserDefinedGroup( 'YourGroupName' );
% my $HasMember = $GroupObj->HasMemberRecursively( $PrincipalObj );
% print "Worked\n" if $HasMember;

Around Wikia's network

Random Wiki