Mango::Provider::Users - Provider class for user information
my $provider = Mango::Provider::Users->new; my $user = $provider->get_by_id(23);
Mango::Provider::Users is the provider class responsible for creating, deleting, updating and searching users.
Creates a new user provider object. If options are passed to new, those are sent to setup.
setup
my $provider = Mango::Provider::Users->new;
See "new" in Mango::Provider and "new" in Mango::Provider::DBIC for a list of other possible options.
Creates a new Mango::User object using the supplied data.
my $user = $provider->create({ username => 'admin', password => 'r2d2c3po' }); print $user->username;
Deletes users from the provider matching the supplied filter.
$provider->delete({ username => 'claco' });
Returns a Mango::User object matching the specified id.
my $user = $provider->get_by_id(23);
Returns undef if no matching user can be found.
Returns a list of Mango::User objects in list context, or a Mango::Iterator in scalar context matching the specified filter.
my @users = $provider->search({ username => 'C%' }); my $iterator = $provider->search({ username => 'C%' });
See "ATTRIBUTES" in DBIx::Class::Resultset for a list of other possible options.
Sets the 'updated' column to DateTime->now and saves any changes made to the user back to the underlying store.
my $user = $provider->create(\%data); $user->password('newpwd'); $provider->update($user);
Mango::Provider, Mango::Provider::DBIC, Mango::Role, DBIx::Class
Christopher H. Laco CPAN ID: CLACO claco@chrislaco.com http://today.icantfocus.com/blog/
To install Mango, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mango
CPAN shell
perl -MCPAN -e shell install Mango
For more information on module installation, please visit the detailed CPAN module installation guide.