I'm using an external customer database backend, everything is working great, but the Name field on the user list appears empty.
This is my backed config, does anyone sees anything wrong ?
Code: Select all
# CustomerUser
# (customer user database backend and settings)
$Self->{CustomerUser} = {
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',
# Type => 'mssql', # only for ODBC connections
DSN => 'DBI:mysql:database=hpg_test;host=mariadb',
User => 'root',
Password => 'changeme',
Table => 'hp_clientes_otrs',
ForeignDB => 1, # set this to 1 if your table does not have create_time, create_by, change_time and change_by fields
# CaseSensitive defines if the data storage of your DBMS is case sensitive and will be
# preconfigured within the database driver by default.
# If the collation of your data storage differs from the default settings,
# you can set the current behavior ( either 1 = CaseSensitive or 0 = CaseINSensitive )
# to fit your environment.
#
# CaseSensitive => 0,
# SearchCaseSensitive will control if the searches within the data storage are performed
# case sensitively (if possible) or not. Change this option to 1, if you want to search case sensitive.
# This can improve the performance dramatically on large databases.
SearchCaseSensitive => 0,
},
# customer unique id
CustomerKey => 'usuario',
# customer #
CustomerID => 'usuario',
# CustomerValid => 'valid_id',
# The last field must always be the email address so that a valid
# email address like "John Doe" <john.doe@domain.com> can be constructed from the fields.
CustomerUserListFields => [ 'nombre', 'apellido', 'email' ],
# CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
CustomerUserSearchFields => [ 'usuario', 'nombre', 'apellido', 'email' ],
CustomerUserSearchPrefix => '*',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => [ 'nombre', 'apellido' ],
CustomerUserEmailUniqCheck => 1,
# # show now own tickets in customer panel, CompanyTickets
# CustomerUserExcludePrimaryCustomerID => 0,
# # generate auto logins
# AutoLoginCreation => 0,
# # generate auto login prefix
# AutoLoginCreationPrefix => 'auto',
# # admin can change customer preferences
# AdminSetPreferences => 1,
# use customer company support (reference to company, See CustomerCompany settings)
CustomerCompanySupport => 0,
# cache time to live in sec. - cache any database queries
CacheTTL => 60 * 60 * 24,
# # just a read only source
# ReadOnly => 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, link class(es)
# [ 'UserTitle', 'Title or salutation' , 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname' , 'nombre', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname' , 'apellido', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username' , 'usuario', 1, 1, 'var', '', 0 ],
[ 'UserPassword', 'Password' , 'password', 0, 0, 'var', '', 0 ],
[ 'UserEmail', 'Email' , 'email', 1, 1, 'var', '', 0 ],
# [ 'UserEmail', 'Email'), 'email', 1, 1, 'var', '[% Env("CGIHandle") %]?Action=AgentTicketCompose;ResponseID=1;TicketID=[% Data.TicketID | uri %];ArticleID=[% Data.ArticleID | uri %]', 0, '', 'AsPopup OTRSPopup_TicketAction' ],
[ 'UserCustomerID', 'CustomerID' , 'usuario', 0, 1, 'var', '', 1 ],
# [ 'UserCustomerIDs', 'CustomerIDs'), 'customer_ids', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Phone' , 'telefono', 1, 1, 'var', '', 0 ],
# [ 'UserFax', 'Fax' , 'fax', 1, 0, 'var', '', 0 ],
[ 'UserMobile', 'Mobile' , 'celular', 1, 1, 'var', '', 0 ],
[ 'UserStreet', 'Street' , 'calle', 1, 1, 'var', '', 0 ],
# [ 'UserZip', 'Zip' , 'zip', 1, 0, 'var', '', 0 ],
[ 'UserCity', 'City' , 'ciudad', 1, 1, 'var', '', 0 ],
[ 'UserMac1', 'Mac Address 1' , 'mac1', 1, 1, 'var', '', 0 ],
[ 'UserMac2', 'Mac Address 2' , 'mac2', 1, 1, 'var', '', 0 ],
[ 'UserPar', 'Par' , 'par', 1, 0, 'var', '', 0 ],
[ 'UserAccesspoint', 'Access Point' , 'accesspoint', 1, 0, 'var', '', 0 ],
[ 'UserTorre', 'Torre' , 'torre', 1, 1, 'var', '', 0 ],
# [ 'UserCountry', 'Country' , 'country', 1, 0, 'var', '', 0 ],
# [ 'UserComment', 'Comment' , 'comments', 1, 0, 'var', '', 0 ],
# [ 'ValidID', 'Valid' , 'valid_id', 0, 1, 'int', '', 0 ],
],
# default selections
Selections => {
# UserTitle => {
# 'Mr.' => 'Mr.'),
# 'Mrs.' => 'Mrs.'),
# },
},
};