Customer's procedures fail with multiple backend

Moderator: crythias

Post Reply
danzone
Znuny newbie
Posts: 3
Joined: 05 May 2010, 10:27
Znuny Version: 6.0.30
Real Name: Daniele Gagliardi

Customer's procedures fail with multiple backend

Post by danzone »

Hi all,
I've installed OTRS 2.4.7 on my Windows XP laptop.

I've configured my OTRS installation to authenticate users both on OTRS database and our internal company LDAP, setting configuration in Kernel/Config/Defaults.pm following instruction on administration manual (page 114 on pdf).

I configured the authentication section adding a section for LDAP and adding indexes 1 and 2 to the newly configured authentication sections:

Code: Select all

    # --------------------------------------------------- #
    # customer authentication settings                    #
    # (enable what you need, auth against otrs db,        #
    # against a LDAP directory, against HTTP basic        #
    # authentication and against Radius server)           #
    # --------------------------------------------------- #
    # This is the auth. module againt the otrs db
    $Self->{'Customer::AuthModule1'}                       = 'Kernel::System::CustomerAuth::DB';
    ...

    # This is an example configuration for an LDAP auth. backend.
    # (take care that Net::LDAP is installed!)
    $Self->{'Customer::AuthModule2'} = 'Kernel::System::CustomerAuth::LDAP';
    ...
and then I've configured the section for backend to retreive customer's informations:


Always ok, I can login using local OTRS db account and using LDAP account, and I'm able to retrieve informations for customer in OTRS db and in company LDAP.

Code: Select all

    # --------------------------------------------------- #
    #                                                     #
    #             Start of config options!!!              #
    #                 CustomerUser stuff                  #
    #                                                     #
    # --------------------------------------------------- #

    # CustomerUser1
    # (customer user database backend and settings)
    $Self->{CustomerUser1} = {
        Name   => 'Database Backend',
        Module => 'Kernel::System::CustomerUser::DB',
        Params => {
            # if you want to use an external database, add the
            # required settings
#            DSN => 'DBI:odbc:yourdsn',
#            DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
#            User => '',
#            Password => '',
            Table => '...',
        },

            ...
    };

# CustomerUser2
# (customer user ldap backend and settings)
    $Self->{CustomerUser2} = {
        Name => 'LDAP Backend',
        Module => 'Kernel::System::CustomerUser::LDAP',
        Params => {
#            # ldap host
            Host =>...,
            ...
    };
After that, I tried to recover a password for a OTRS db account using functionality exposed on customer login module (http://otrs_server/otrs/customer.pl).
OTRS sens me correctly an e-mail with a link to activate change password, I receive the message in my mail box, check the url and OTRS fails with a web page containing the message:

Code: Select all

Can't call method "GenerateRandomPassword" on an undefined value at C:/Programmi/OTRS/OTRS/bin/cgi-bin/../../Kernel/System/CustomerUser.pm line 466, <DATA> line 275.
I saw the CustomerUser.pm source code, at line 466:

Code: Select all

sub GenerateRandomPassword {
    my $Self = shift;

    return $Self->{CustomerUser}->GenerateRandomPassword(@_);
}
It seems that object CustomerUser is undefined, after tha multiple backend settings modification.

Sadly in C:\Programmi\OTRS\OTRS\var\log\otrs.log there is no other
information.

A similar problem I have had with customer's self registration procedure: OTRS fails with a web page containing the message:

Code: Select all

Can't use an undefined value as a HASH reference at C:/Programmi/OTRS/OTRS/bin/cgi-bin/../../Kernel/System/Web/InterfaceCustomer.pm line 555, <DATA> line 275.
At that line code I've found following source:

Code: Select all

        for my $Entry ( @{ $Self->{ConfigObject}->Get('CustomerUser')->{Map} } ) {
            $GetParams{ $Entry->[0] } = $Self->{ParamObject}->GetParam( Param => $Entry->[1] )
                || '';
        }

Again the object CustomerUser, from ConfigObject. I guess that, in both cases, the reference is undefined because it look for 'CustomerUser' object in Config object, but now in my multiple backend settins I've the two objects CustomerUser1 and CustomerUser2.

How can I solve this?

Maybe something wrong with my configuration?

Thanks for your response

Daniele Gagliardi
Post Reply