Christopher H. Laco > Mango-0.01000_13 > Mango::User

Download:
Mango-0.01000_13.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Mango::User - Module representing an individual user

SYNOPSIS ^

    my $user = $provider->search({ username => 'claco' });
    print $user->created;
    $user->password('newpassword');
    $user->update;

DESCRIPTION ^

Mango::User represents an individual user.

METHODS ^

created

Returns the date and time in UTC the user was created as a DateTime object.

    print $user->created;

destroy

Deletes the current user.

    $user->destroy;

id

Returns the id of the current user.

    print $user->id;

update

Saves any changes made to the user back to the provider.

    $user->password('Red');
    $user->update;

Whenever "update" is called, "updated" is automatically set to the current time in UTC.

updated

Returns the date and time in UTC the user was last updated as a DateTime object.

    print $user->updated;

username

Arguments: $username

Gets/sets the username of the current user.

    print $user->username;

password

Arguments: $password

Gets/sets the password of the current user.

    print $user->password;

SEE ALSO ^

Mango::Object, Mango::Provider::Users

AUTHOR ^

    Christopher H. Laco
    CPAN ID: CLACO
    claco@chrislaco.com
    http://today.icantfocus.com/blog/
syntax highlighting: