Error when configuring a custom user backend

Moderator: crythias

Post Reply
jeanmonod
Znuny newbie
Posts: 4
Joined: 15 Jul 2011, 16:27
Znuny Version: 3.0.9
Real Name: David Jeanmonod
Company: Idael Software

Error when configuring a custom user backend

Post by jeanmonod »

Hi all,

I got that error, and I really don't know how to fix it:

Code: Select all

[Fri Jul 29 07:52:41 2011] -e: Use of uninitialized value within %Users in substitution (s///) at /opt/otrs//Kernel/System/CustomerUser/DB.pm line 321.
ERROR: OTRS-CGI-10 Perl: 5.10.1 OS: linux Time: Fri Jul 29 07:52:42 2011

 Message: Need User!

 Traceback (2336): 
   Module: Kernel::System::CustomerUser::DB::CustomerUserDataGet (v1.86) Line: 448
   Module: Kernel::System::CustomerUser::CustomerUserDataGet (v1.61.2.1) Line: 283
   Module: Kernel::Modules::AdminCustomerUser::_Overview (v1.89.2.6) Line: 549
   Module: Kernel::Modules::AdminCustomerUser::Run (v1.89.2.6) Line: 481
   Module: Kernel::System::Web::InterfaceAgent::Run (v1.58.2.1) Line: 853
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 46
   Module: (eval) (v1.89.2.1) Line: 204
   Module: ModPerl::RegistryCooker::run (v1.89.2.1) Line: 204
   Module: ModPerl::RegistryCooker::default_handler (v1.89.2.1) Line: 170
   Module: ModPerl::Registry::handler (v1.99) Line: 31
And here is the extract of my custom backend config:

Code: Select all

    # ---------------------------------------------------- #
    # Custom customer config                               #
    # ---------------------------------------------------- #  
    $Self->{CustomerUser} = {
      ReadOnly => 1,
      Name => 'Custom Database',
      Module => 'Kernel::System::CustomerUser::DB',
      Params => {
        DSN => 'DBI:mysql:database=otrs_backend;host=localhost',
        User => 'otrs_admin',
        Password => 'otrs_admin',
        Table => 'customer_raw'
      },
      CustomerKey => 'id',
      CustomerID => 'num',
      CustomerValid => 'valid',
      CustomerUserListFields => ['name', 'phone1', 'phone2', 'email'],
      CustomerUserSearchFields => ['name'],
      CustomerUserPostMasterSearchFields => ['email'],
      CustomerUserNameFields => ['name'],
      CustomerUserEmailUniqCheck => 0,  
      CustomerCompanySupport => 1,
      Map => [
        # note: Login, Email and CustomerID needed!
        # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
        [ 'UserLogin',      'Username',   'email',        1, 1, 'var', '', 0 ],
        [ 'UserEmail',      'Email',      'email',        1, 0, 'var', '', 0 ],
        [ 'UserCustomerID', 'ShopID',     'num',          1, 1, 'var', '', 0 ],
        [ 'UserPhone',      'Phone 1',    'phone1',       1, 0, 'var', '', 0 ],
        [ 'UserFax',        'Phone 2',    'phone2',       1, 0, 'var', '', 0 ],
        [ 'ValidID',        'Valid',      'valid',        0, 1, 'int', '', 0 ],
      ],
      CustomerUserSearchPrefix => '*',
      CustomerUserSearchSuffix => '*',
      CustomerUserSearchListLimit => 250
    };
Is one of you have already got that problem?

Thanks for support
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Error when configuring a custom user backend

Post by crythias »

You don't have CustomerID in your Map.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply