
CatalystX::Usul::Users - User domain model

0.7.$Revision: 1181 $

use CatalystX::Usul::Users;

Implements the base class for user data stores. Each subclass that inherits from this should implement the required list of methods

Constructor initialises these attributes
A hashref of the user object attributes and their default values
Path to the directory containing the user password history files and the count of failed login attempts
Placeholder methods returns undef. May be overridden in a subclass
Called by the "check_password" method via the factory subclass. The supplied password is encrypted and compared to the one in storage. Failures are counted and when max_login_trys are exceeded the account is disabled. Errors can be thrown for; unknown user, inactive account, expired password, maximum attempts exceeded and incorrect password
Proxies a call to update_password which must be implemented by the subclass
This method is required by the Catalyst::Authentication::Store API. It calls the factory method in the subclass to check that the supplied password is the correct one
Calls update_password in the subclass to set the users encrypted password to *DISABLED thereby preventing the user from logging in
$enc_pass = $self->encrypt_password( $force, $user, $old, $new, $encrypted);
Encrypts the new password and returns it. If the encrypted flag is true then new is assumed to be already encrypted and is returned unchanged. The old password is used to authenticate the user unless the force flag is true
This method is required by the Catalyst::Authentication::Store API. It returns a user object (obtained by calling "get_user") even if the user is unknown. If the user is known a list of roles that the user belongs to is also returned. Adds a weakened reference to self so that Catalyst::Authentication can call the "check_password" method
This method is required by the Catalyst::Authentication::Store API. Returns the self referential object
This method is required by the Catalyst::Authentication::Store API. Field accessor returns undef if the field does not exist, otherwise returns the value of the required field
Implements the algorithm that derives the username from the users first name and surname. The supplied prefix from the user profile is prepended to the generated value. If the prefix contains unique domain information then the generated username will be globally unique to the organisation
Placeholder methods returns undef. May be overridden in a subclass
This method is required by the Catalyst::Authentication::Store API. Returns the self referential object
Returns a user object for the given user id. If the user does not exist then a user object with a name of unknown is returned
Placeholder methods returns an empty list. May be overridden in a subclass
This method is required by the Catalyst::Authentication::Store API. Returns the username of the user object
Returns true if the given user exists, false otherwise
Returns an array ref of all users
Takes a user if or an an attribute hash, returns a guess as to what the users email address might be
Returns a user object for the selected user and a list of usernames
Proxies a call to update_password which must be implemented by the subclass
Wraps a call to "authenticate" in a try block so that a failure to validate the password returns false rather than throwing an exception

None

None


There are no known incompatibilities in this module

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Peter Flanigan, <Support at RoxSoft.co.uk>

Larry Wall - For the Perl programming language

Copyright (c) 2009 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE