
OpenInteract2::Auth::Group - Retreive groups into OpenInteract

# Called by OI2::Auth
my $groups = OpenInteract2::Group->get_groups( $auth );
print "User ", $auth->user->login_name, " member of groups: \n";
foreach my $group ( @{ $groups } ) {
print " * ", $group->name, "\n";
}
print "User ", $auth->user->login_name, " member of groups: \n";
foreach my $group ( @{ $auth->groups } ) {
print " * ", $group->name, "\n";
}

Retrieve groups given a user.

get_groups( $auth )
Pulls a 'user' object from $auth (an OpenInteract2::Auth object) and Returns all groups to which it belongs, as long as the is_logged_in property of $auth is true. If not then we immediately return an empty arrayref.
Returns: arrayref of groups found; also set into $auth

Copyright (c) 2002-2005 Chris Winters. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Chris Winters <chris@cwinters.com>