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

Name

CatalystX::Usul::Users::Simple - User data store in local files

Version

Describes v0.17.$Rev: 1 $

Synopsis

   use CatalystX::Usul::Users::Simple;

   my $class = CatalystX::Usul::Users::Simple;

   my $user = $class->new( $attr );

Description

Stores user account information in a JSON file in the control directory

Configuration and Environment

Defined the following attributes

field_map

A hash ref which maps the field names used by the user model onto the field names used by the data store

filename

The name of the file containing the user accounts. A string which defaults to users-simple.json

get_features

A hash ref which details the features supported by this user data store

path

A path to a file that contains the user accounts

schema

An instance of File::DataClass::Schema using the JSON storage class

Subroutines/Methods

activate_account

Searches the user store for the supplied user name and if it exists sets the active column to true

assert_user

Returns a CatalystX::Usul::Response::User object for the specified user or throws an exception if the user does not exist

change_password

Changes the users password

check_password

Checks the users password

create

Create a new user account, populate the home directory and create a mail alias for the users email address to the new account

delete

Delete the users mail alias and then delete the account

get_primary_rid

Returns the users primary role (group) id from the user account file

get_user

Returns a hashref containing the data fields for the requested user. Maps the field name specific to the store to those used by the user model

get_users_by_rid

Returns the list of users the share the given primary role (group) id

is_user

Returns true if the user exists, false otherwise

list

Returns the list of usernames matching the given pattern

set_password

Sets the users password to a given value

update

Updates the user account information

update_password

Updates the users password in the database

user_report

Creates a report about the user accounts in this store

Diagnostics

None

Dependencies

CatalystX::Usul::Users
CatalystX::Usul::Moose
CatalystX::Usul::Constraints

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) 2014 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