Interchange6::Schema::Result::User
Primary key.
The username is automatically converted to lowercase so we make sure that the unique constraint on username works.
Unique nickname for user.
email address.
Hashed password using Crypt::Eksblowfish::Bcrypt. Check password method is check_password.
check_password
User's first name.
User's last name.
Last login returned as DateTime object. Updated on successful call to check_password.
Count of failed logins since last successful login. On successful call to check_password gets reset to zero but on fail is incremented.
Date and time when "reset_token" expires.
Used to store password reset token.
Boolean denoting an anonymous user. Defaults to 0 (false);
Date and time when this record was created returned as DateTime object. Value is auto-set on insert.
Date and time when this record was last modified returned as DateTime object. Value is auto-set on insert and update.
Is this user account active? Default is yes.
Type: has_many
Related object: Interchange6::Schema::Result::Address
Related object: Interchange6::Schema::Result::Cart
Related object: Interchange6::Schema::Result::Order
Related object: Interchange6::Schema::Result::UserAttribute
Related object: Interchange6::Schema::Result::UserRole
Type: many_to_many
Composing rels: "user_roles" -> role
Related object: Interchange6::Schema::Result::Message FK approved_by_users_id
approved_by_users_id
Related object: Interchange6::Schema::Result::Message FK author_users_id
author_users_id
Attribute methods are provided by the Interchange6::Schema::Base::Attribute class.
Called during table creation to add indexes on the following columns:
reset_token
Arguments should be a hash of the following key/value pairs:
duration => $datetime_duration_hashref
Value should be a hash reference containing values that can be passed directly to "new" in DateTime::Duration. Passing an undef value to duration will lead to the creation of a reset token that does not expire. Default duration is 24 hours.
entropy => $number_of_bits
The number of bits of entropy to be used by "new" in Session::Token. Defaults to 128.
This method sets "reset_expires" and "reset_token" and returns the value of "reset_token" with checksum added.
Returns the checksum for the token stored in "reset_token".
Checksum is a digest of "password", "reset_token" and "reset_expires" (if this is defined). This ensures that a reset token is not valid if password has changed or if a newer token has been generated.
When passed combined token and checksum as argument returns 1 if token and checksum are correct and "reset_expires" is not in the past (if it is defined). Returns 0 on failure.
Overloaded method.
If "username" is undefined and "is_anonymous" is defined then create a unique username for this anonymous user and set "active" to false. Otherwise check username using "check_username".
Overloaded method. Always add new users to Role with name 'user' unless user has "is_anonymous" set in which case add user to role 'anonymous';
Overloaded method. Check username using "check_username" if supplied.
Die if $username is undef or empty string. Otherwise return lc($username)
$username
lc($username)
Returns resultset of messages that are blog posts (Message->type eq 'blog_post')
Returns "first_name" and "last_name" joined by a single space.
Returns resultset of messages that are reviews (referenced by ProductReview class).
To install Interchange6::Schema, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Interchange6::Schema
CPAN shell
perl -MCPAN -e shell install Interchange6::Schema
For more information on module installation, please visit the detailed CPAN module installation guide.