Name
CatalystX::Usul::Model::UserProfiles - CRUD methods for user account profiles
Version
Describes v0.9.$Rev: 0 $
Synopsis
package YourApp;
use Catalyst qw(ConfigComponents...);
__PACKAGE__->config( 'Model::UserProfiles' => {
parent_classes => 'CatalystX::Usul::Model::UserProfiles' } );
Description
These methods maintain the user account profiles used by the identity class to create new user accounts. This class inherits from CatalystX::Usul::Model. Data is stored in the user_profiles.json file in the ctrldir
Configuration and Environment
Defines the following list of attributes
- domain_class
-
Overrides the default value in the base class with
CatalystX::Usul::UserProfiles
- role_model_class
-
A string which defaults to
RolesUnix
- shells_attributes
-
A hash ref used to construct the shells domain object
- shells_class
-
A loadable class which defaults to
CatalystX::Usul::Shells
Subroutines/Methods
build_per_context_instance
$clone = $self->build_per_context_instance( $c, @rest );
Clones an instance if the domain model, caches copies of the role model and the shells model on the clone
create_or_update
$profile_name = $self->create_or_update;
Creates a new user account profile or updates an existing one. Field data is extracted from the request object. The result message is written to the stash
delete
$self->delete;
Delete the selected user account profile. The name of the profile to delete is extracted from the request object. The result message is written to the stash
find
$profile_obj = $self->find( $profile_name );
Returns a File::DataClass::Result object for the wanted profile
list
$profile_list_obj = $self->list( $profile_name );
Returns a File::DataClass::List object whose list
attribute is an array ref of account profile names. If a profile name is given it also returns a File::DataClass::Result object for that profile
user_profiles_form
$self->user_profiles_form( $profile_name );
Stuffs the stash with the data to generate the profile editing form
Diagnostics
None
Dependencies
- CatalystX::Usul::Model
- CatalystX::Usul::TraitFor::Model::QueryingRequest
- CatalystX::Usul::TraitFor::Model::StashHelper
- CatalystX::Usul::Moose
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>
License and Copyright
Copyright (c) 2013 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