-
-
17 Dec 2015 02:49:35 UTC
- Distribution: Rubric
- Module version: 0.156
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (397 / 12 / 0)
- Kwalitee
Bus factor: 1- 77.46% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (75.24KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- App::Cmd
- App::Cmd::Command
- App::Cmd::Command::commands
- CGI::Application
- CGI::Carp
- CGI::Cookie
- Carp
- Class::Accessor
- Class::DBI
- Class::DBI::AbstractSearch
- Class::DBI::utf8
- Crypt::CBC
- Crypt::Rijndael
- DBI
- Date::Span
- DateTime
- Digest::MD5
- Email::Address
- Email::Sender::Simple
- Encode
- File::ShareDir
- File::Spec
- HTML::CalendarMonth
- HTML::TagCloud
- HTML::Widget::Factory
- JSON
- LWP::Simple
- MIME::Base64
- Scalar::Util
- String::TagString
- String::Truncate
- Sub::Exporter
- Template
- Template::Filters
- Template::Plugin::Class
- Time::Piece
- YAML::XS
- base
- parent
- strict
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Rubric::User - a Rubric user
VERSION
version 0.156
DESCRIPTION
This class provides an interface to Rubric users. It inherits from Rubric::DBI, which is a Class::DBI class.
COLUMNS
username - the user's login name password - the hex md5sum of the user's password email - the user's email address created - the user's date of registration verification_code - the code sent to the user for verification NULL if verified
RELATIONSHIPS
entries
Every user has_many entries, which are Rubric::Entry objects. They can be retrieved with the
entries
accessor, as usual.tags
A user has as "his" tags all the tags that occur on his entries. There exist a number of accessors for his tag list.
tags
This returns an arrayref of all the user's (non-system) tags in their database colation order.
tags_counted
This returns an arrayref of arrayrefs, each containing a tag name and the number of entries tagged with that tag. The pairs are sorted in colation order by tag name.
related_tags(\@tags, \%context)
This method returns a reference to an array of tags related to all the given tags. Tags are related if they occur together on entries.
related_tags_counted(\@tags, \%context)
This is the obvious conjunction of
related_tags
andtags_counted
. It returns an arrayref of arrayrefs, each a pair of tag/occurance values.INFLATIONS
created
The created column is stored as seconds since epoch, but inflated to Time::Piece objects.
METHODS
quick_entry(\%entry)
This method creates or updates an entry for the user. The passed entry should include the following data:
uri - the URI for the entry tags - the tags for the entry, as a space delimited string title - the title for the entry description - the description for the entry body - the body for the entry
If an entry for the link exists, it is updated. Existing tags are replaced with the new tags. If no entry exists, the Rubric::Link is created if needed, and a new entry is then created.
The Rubric::Entry object is returned.
verify($code)
If the given code matches this user's
verification_code
, the user will be verified; that is, hisverification_code
will be undefined.reset_password($code)
If the given code matches this user's
reset_code
, the user's password will be reset viarandomize_password
and his reset code will be undefined. If successful, the new password is returned. Otherwise, the routine returns false.randomize_password
This method resets the user's password to a pseudo-random string and returns the new password.
randomize_reset_code
This method resets the user's reset code to the md5sum of a pseudo-random string.
randomize_verification_code
This method resets the user's verification code to the md5sum of a pseudo-random string.
AUTHOR
Ricardo SIGNES <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2004 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Rubric, copy and paste the appropriate command in to your terminal.
cpanm Rubric
perl -MCPAN -e shell install Rubric
For more information on module installation, please visit the detailed CPAN module installation guide.