NAME
Elive::Entity::User - Elluminate Users entity class
DESCRIPTION
These are used to query and maintain information on registered Elluminate Live! users.
METHODS
get_by_loginName
my $user = Elive::Entity::User->get_by_loginName('joebloggs');
Retrieve on loginName, which is a co-key for the users table.
Please note that the Elluminate Web Services raise an error if the user was not found. So, if you're not sure if the user exists:
my $user = eval {Elive::Entity::User->get_by_loginName('joebloggs')};
insert
my $new _user = Elive::Entity::User->insert({
loginName => ...,
loginPassword => ...,
firstName => ...,
lastName => ...,
email => ...,
role => {roleId => 0|1|2|3},
)};
Insert a new user
update
my $user_obj = Elive::Entity::user->retrieve([$user_id]);
$user_obj->update(role => 0); # make the user an app admin
$user_obj->lastName('Smith');
$user_obj->update(undef, force => 1);
Update an Elluminate user. Everything can be changed, other than userId. This includes the loginName. However loginNames must all remain unique.
As a safeguard, you'll need to pass force => 1
to update: (a) users with a Role Id of 0, i.e. system administrator accounts, or (b) the login user
change_password
Implements the changePassword
SDK method.
my $user = Elive::Entity::User->retrieve([$user_id]);
$user->change_password($new_password);
This is equivalent to:
my $user = Elive::Entity::User->retrieve([$user_id]);
$user->update({loginPassword => $new_password});
delete
$user_obj->delete();
$admin_user_obj->delete(force => 1);
Delete user objects. As a safeguard, you need to pass force => 1
to delete system administrator accounts, or the login user.
RESTRICTIONS
Elluminate Live! can be configured to use LDAP for user management and authentication.
If LDAP is in use, the fetch and retrieve methods will continue to operate via the Elluminate SOAP command layer. User access becomes read-only. The affected methods are: insert
, update
, delete
and change_password
.