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). You may turn on the autoinstall
setting (see "CONFIGURATION" in Konstrukt::Handler) or use the KonstruktBackendInitialization.pl
script to accomplish this task.
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.
Parameters:
Adds an user.
Returns the id of the added user if operation was successful, -1 if the user already exists and undef otherwise.
Parameters:
Removes an user
Returns the id of the added user if operation was successful, undef otherwise.
Parameters:
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.
Parameters:
Returns the user id coresponding to a given email address, if the email address exists, undef otherwise.
Parameters:
Sets the data specified in the passed hash in the database
Parameters:
Sets the password for the specified user.
Parameters:
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::Plugins::usermanagement::basic, Konstrukt::Plugins::usermanagement, Konstrukt