CustomerUser DB same user different company

Moderator: crythias

Post Reply
tinti
Znuny newbie
Posts: 11
Joined: 24 Oct 2016, 16:16
Znuny Version: 5.0.14
Real Name: Raoul

CustomerUser DB same user different company

Post by tinti »

I am having a problem with the CustomerUser DB in OTRS 5. In earlier OTRS 4 the following worked fine.
We are using an external customer database containing the fields: uid, email_address, company_name, first_name and last_name. The search is made on CustomerUserSearchFields => ['uid', 'last_name', 'company_name'] and the result is build of CustomerUserListFields => ['first_name', 'last_name', 'email_address']. The uid field is concatenated email_address + company_name to be unique.

This works fine except when we have the exact same entry for different companies:

Code: Select all

uid                           email_address        company_name        first_name       last_name
user1@example.com-company1    user1@example.com    company1            user             first
user2@example.com-company1    user2@example.com    company1            user             second
user1@example.com-company2    user1@example.com    company2            user             first
User1 from company2 cannot be found by email or last_name, there is always only one result, same when I try to limit my search on company_name. If I change for the last_name of one entry to First or firsT, I can find both users again.

I've tried modifying parameters CaseSensitive and CustomerUserEmailUniqCheck without success. Anyone having an idea to revert to the behaviour as in older OTRS versions?
Post Reply