
Hi, All!
I`d change source of OTRS for my needs. I think, that it can be useful for
other. So, I posting it in this list.
In Kernel::Config.pm:
<cut>
# --------------------------------------------------- #
# #
# Start of config options!!! #
# CustomerAuth stuff #
# #
# --------------------------------------------------- #
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::DB';
# CustomerAuth
# (customer auth database backend and settings)
$Self->{CustomerAuth} = {
Module => 'Kernel::System::CustomerAuth::DB',
Params => {
DSN => 'DBI:Pg:dbname=stats;host=194.44.58.68',
User => 'support',
Password => 'tekr_21',
Table => 'abons_for_otrs'
},
# customer #
CustomerID => 'customer_id',
ValidID => 'valid_id',
CustomerAuthUserField => 'login',
CustomerAuthPwField => 'pw',
ReadOnly => 1,
Map => [
# # note: Login, Email and CustomerID needed!
# # var, frontend, storage, shown, required, storage-type,http-link
# [ 'UserLastname', 'Lastname', 'firm_sh', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'login', 1, 1, 'var' ],
[ 'UserPassword', 'Password', 'pw', 0, 1, 'var' ],
# [ 'UserEmail', 'Email', 'email', 0, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var' ],
[ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int' ],
],
};
<cut>
Kernel::System::CustomerAuth::DB.pm was rewrited:
# --
# Kernel/System/CustomerAuth/DB.pm - provides the db authentification
# Copyright (C) 2002-2003 Martin Edenhofer