The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

ETLp::Audit::Browser::Model::User - Model Class for interacting with Runtime FileProcess User Records

SYNOPSIS

    use ETLp::Audit::Browser::Model::User;
    
    my $model = ETLp::Audit::Browser::Model::User->new();
    my $processes = $model->get_user_by_username('jbloggs');
    

METHODS

get_user_by_username

Returns an etlp_user record given the username

Parameters

    * username. Required. The name of the user
    

Returns

    * A DBIx::Class record
    

get_user

Returns an etlp_user record given the user id

Parameters

    * username. Required. The name of the user
    

Returns

    * A DBIx::Class record
    

get_users

Returns the users one page at a time

Parameters

    * page. optional. The page being requested. Defaults to 1
    

Returns

    * A DBIx::Class resultset
    

save

Saves user input

Parameters

A hashref consisting of

    * user_id
    * username
    * first_name
    * last_name
    * password (optional), unencrypted
    * password2 (optional), unencrypted
    * email_address (optional)
    * admin (optional, 1= admin 0 = not admin)
    * active (optional, 1 = active, 0 = inactive)
    

Returns

    * A DBIx::Class resultset

generate_salt

Returns a salt that is used in the password encrytion routine

Parameters

    * None
    

head3 Returns

    * Up to eight characters (from Lower and upper case letters,
      digits period, slash)    

encrypt_password

Encrypts plaint test text password

Parameters

    * password. String.
    

Returns

    * encrypted password
    

check_password

Checks whether the exncrypted plaintext password will match the actual encrypted password

Parameters

    * paintext_password. String. Mandatory.
    * encrypted_password. String. Mandatory. The encrypted password
    

Returns

    * Void
    

update_password

Update a user's password

Parameters

    * password. String. Mandatory. The plaintext password
    * user_id. Integer. Mandatory. The user updating this record.
    

Returns

    * Void
    

LICENSE AND COPYRIGHT

Copyright 2010 Redbone Systems Ltd

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

The terms are in the LICENSE file that accompanies this application