Konstrukt::Plugin::usermanagement::basic::DBI - Konstrukt basic userdata. DBI Backend Driver
#TODO
The DBI backend for the basic usermanagement.
#backend usermanagement/basic/backend/DBI/source dbi:mysql:database:host usermanagement/basic/backend/DBI/user username usermanagement/basic/backend/DBI/pass password
If no database settings are set the defaults from "CONFIGURATION" in Konstrukt::DBI will be used.
You have to create the database table user_basic to use this plugin. As this plugin depends on the log-plugin, you also have to create a table log (See "CONFIGURATION" in Konstrukt::Plugin::log).
user_basic
log
You may turn on the autoinstall setting (see "CONFIGURATION" in Konstrukt::Handler) or use the KonstruktBackendInitialization.pl script to accomplish this task.
autoinstall
KonstruktBackendInitialization.pl
Initialization of this class
Installs the backend (e.g. delete/create tables).
Parameters:
none
Checks, if a email/password combination exists in the database
Returns the user id of this user in the database if the combination is valid, 0 otherwise.
$email - The email address of the user
$pass - The users password
Adds an user.
Returns the id of the added user if operation was successful, -1 if the user already exists and undef otherwise.
Removes an user
Returns the id of the added user if operation was successful, undef otherwise.
$uid - The ID of the user to remove.
Returns the user data as an hash reference, if the uid exists: { email => 'a@b.c', pass => '<hash>' } Returns an empty hash reference if the user doesn't exist.
$uid - The ID of the user
Returns the user id coresponding to a given email address, if the email address exists, undef otherwise.
Sets the data specified in the passed hash in the database
$data - Hashreference with the data that should be set: { email => .., password => .. }
Sets the password for the specified user.
$password - The new password
Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.
This document is free software. It is distributed under the same terms as Perl itself.
Konstrukt::Plugin::usermanagement::basic, Konstrukt::Plugin::usermanagement, Konstrukt
To install Konstrukt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Konstrukt
CPAN shell
perl -MCPAN -e shell install Konstrukt
For more information on module installation, please visit the detailed CPAN module installation guide.