Thomas Wittek > Konstrukt > Konstrukt::Plugin::usermanagement::basic::DBI

Download:
konstrukt/Konstrukt-0.5-beta13.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View Bugs
Report a bug
Source  

NAME ^

Konstrukt::Plugin::usermanagement::basic::DBI - Konstrukt basic userdata. DBI Backend Driver

SYNOPSIS ^

        #TODO

DESCRIPTION ^

The DBI backend for the basic usermanagement.

CONFIGURATION ^

        #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.

METHODS ^

init

Initialization of this class

install

Installs the backend (e.g. delete/create tables).

Parameters:

none

check_login

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:

register

Adds an user.

Returns the id of the added user if operation was successful, -1 if the user already exists and undef otherwise.

Parameters:

deregister

Removes an user

Returns the id of the added user if operation was successful, undef otherwise.

Parameters:

get_data

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:

get_id_from_email

Returns the user id coresponding to a given email address, if the email address exists, undef otherwise.

Parameters:

set_data

Sets the data specified in the passed hash in the database

Parameters:

set_password

Sets the password for the specified user.

Parameters:

AUTHOR ^

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.

SEE ALSO ^

Konstrukt::Plugin::usermanagement::basic, Konstrukt::Plugin::usermanagement, Konstrukt