Elive::Entity::Group - Elluminate Group entity instance class
Groups of users are typically used to specify session participants.
This class is used to query and maintain groups.
The members property contains the group members as an array of user IDs or sub-group objects.
members
If the a site is configured for LDAP, groups are mapped to LDAP groups. Group access becomes read-only. The affected methods are: insert, update, and delete.
insert
update
delete
# # insert from an array of User Ids. Elements may be integers, strings # and/or user objects. # my $alice = Elive::Entity::User->get_by_loginName('alice'); my $bob = Elive::Entity::User->get_by_loginName('bob'); my $group = Elive::Entity::Group->insert({ name => 'Elluminati', # following are all ok members => [111111, '222222', $alice->userId, $bob ], }, ); # # insert from a comma separated string of user IDs # my $group = Elive::Entity::Group->insert({ name => 'Elluminati', members => '111111,222222,333333', }, );
Inserts a new group.
$group->update({members => [111111,'222222', $alice->userId, $bob]}); $group->update({members => '111111,222222,333333'});
Updates an existing group.
This is a utility method that includes the sum total of all members in the group, including those in recursively nested sub-groups. The list is further reduced to only include unique members.
my @all_members = $group_obj->expand_members();
It returns loginNames as an array of strings.
loginNames
To install Elive, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Elive
CPAN shell
perl -MCPAN -e shell install Elive
For more information on module installation, please visit the detailed CPAN module installation guide.