Home | Wiki | OI 1.x Docs | OI 2.x Docs OI logo

NAME

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

SYNOPSIS

 # 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";
 }

DESCRIPTION

Retrieve groups given a user.

METHODS

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

Copyright (c) 2002-2003 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.

AUTHORS

Chris Winters <chris@cwinters.com>

Generated from the OpenInteract 1.99_03 source.


Home | Wiki | OI 1.x Docs | OI 2.x Docs
SourceForge Logo