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

Name

CatalystX::Usul::Model::Users - Catalyst user model

Version

0.6.$Revision: 1165 $

Synopsis

   use CatalystX::Usul::Model::Users;

   my $user_obj = CatalystX::Usul::Model::Users->new( $app, $config );

Description

Forms and actions for user maintainence

Subroutines/Methods

COMPONENT

Constructor initialises these attributes

app_name

Name of the application using this identity model. Prefixes the subject line of the account activation email sent to users who create an account via the registration method

rprtdir

Location in the filesystem of the user reports

sessdir

Location in the filesystem of used user passwords and account activation keys

build_per_context_instance

fs_domain

An clone of the FileSystem model used by the "user_report_form" method to list the available user reports

activate_account

Checks for the existence of the file created by the "register" method. If it exists it contains the username of a recently created account. The accounts active attribute is set to true, enabling the account

authenticate

Calls authenticate in the domain model

authentication_form

Adds fields to the stash for the login screen

authenticate_user

Authenticate the user. If another controller was wanted and the user was forced to authenticate first, redirect the session to the originally requested controller. This was stored in the session by the auto method prior to redirecting to the authentication controller which forwarded to here

change_password

Method to change the users password. Throws exceptions for field constraint failures and if the passwords entered are not the same

change_password_form

Adds field data to the stash for the change password screen. Allows users to change their own password

create_or_update

Method to create a new account or update an existing one. Throws exceptions for field constraint failures. Calls methods in the subclass to do the actual work

delete

Deletes the selected account

find_user

Calls find_user in the domain model

get_features

Delegates the call to the domain model

get_primary_rid

Returns the primary role id for the given user. Note not all storage models support primary_role ids

get_users_by_rid

Returns the list of users that share the given primary role id

is_user

Calls is_user in the domain model

profiles

Returns the domain model's profiles object

purge

Delete the list of selected accounts

register

Create the self registered account. The account is created in an inactive state and a confirmation email is sent

register_form

Added the fields to the stash for the self registration screen. Users can use this screen to create their own accounts

retrieve

Calls retrieve in the domain model

set_password

Sets the users password to a given value

user_fill

Sets the fill attribute of the stash in response to clicking the auto fill button

user_manager_form

Adds fields to the stash for the user management screen. Adminstrators can create new accounts or modify the details of existing ones

user_report

Creates a report of the user accounts in this realm

user_report_form

View either the list of available account reports or the contents of a specific report

user_security_form

Add fields to the stash for the security administration screen. From here administrators can reset passwords and change the list of roles to which the selected user belongs

Diagnostics

None

Configuration and Environment

None

Dependencies

CatalystX::Usul::Captcha
CatalystX::Usul::Email
CatalystX::Usul::Model
CatalystX::Usul::Shells
CatalystX::Usul::Time

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

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

Author

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

Acknowledgements

Larry Wall - For the Perl programming language

License and Copyright

Copyright (c) 2011 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