Overwrite LDAP CustomerUser Map field with static value

Moderator: crythias

Locked
hypex
Znuny newbie
Posts: 10
Joined: 14 Jul 2010, 08:19
Znuny Version: OTRS5

Overwrite LDAP CustomerUser Map field with static value

Post by hypex »

Hi there

I have LDAP backend setup for CustomerUser and would like to overwrite a map field with a static value. Currently its pulling the Active Directory field 'company' which is empty. I would like to hard code a value in, lets say 'ABC' but when i change it I presume its looking for the Active Directory attribute "ABC" which doesn't exists returning empty.

Code: Select all

 Map => [
       ...
            #want to change this
            [ 'UserCustomerID', 'CustomerID', 'company',            0, 1, 'var', '', 0 ],
            #to this
            [ 'UserCustomerID', 'CustomerID', 'ABC',            0, 1, 'var', '', 0 ],
Is this possible or can you suggest a better way to approach this?

My original thoughts was to copy Kernel/System/CustomerUser/LDAP.pm, add a switch to the Map array telling LDAP.pm to read it as a staticvalue but that will be a nightmare going forward for updates.
blastik
Znuny newbie
Posts: 49
Joined: 24 Feb 2012, 09:59
Znuny Version: 5.0.16
Location: Barcelona, Spain
Contact:

Re: Overwrite LDAP CustomerUser Map field with static value

Post by blastik »

hi,

it would help if you explain what are you trying to achieve with this because to me it doesnt make much sense.
OTRS 5
Ubuntu with MySQL
Authenticating users & agents via LDAP
hypex
Znuny newbie
Posts: 10
Joined: 14 Jul 2010, 08:19
Znuny Version: OTRS5

Re: Overwrite LDAP CustomerUser Map field with static value

Post by hypex »

Tying to link Customer Users from Ldap to Customers(company).
New to OTRS, any help given is me guessing
Locked