Hardcoded CustomerID?

Moderator: crythias

Locked
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Hardcoded CustomerID?

Post by Mothra »

Is there any way I can hard code the CustomerID in Kernel/Config.pm, rather than using an LDAP attribute?

I'm asking this because the company where I'm currently supporting OTRS, does not fill in the Company field (in Actigve Directory) for everyone - for employees, it can be variations on the company name and for contractors, the field is blank.

This prevents me from giving everyone the same company ID so people can see each other's tickets.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Hardcoded CustomerID?

Post by crythias »

*A* way to do this is to mass apply the CustomerID to everyone in some other field within LDAP.

An icky other way (I guess?) might be to manipulate Kernel/System/CustomerUser/LDAP.pm

FInd something like:

Code: Select all

    # customer id
    if ( $Self->{CustomerUserMap}->{CustomerID} ) {
        $Self->{CustomerID} = $Self->{CustomerUserMap}->{CustomerID};
    }
    else {
        $Self->{LogObject}->Log(
            Priority => 'error',
            Message  => 'Need CustomerUser->CustomerID in Kernel/Config.pm',
        );
        return;
    }
and replace it with maybe:

Code: Select all

    $Self->{CustomerID} = "MyCustomerID";
I have no idea if this will work, but maybe it could.
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
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Re: Hardcoded CustomerID?

Post by Mothra »

I'll try it out and see what happens. Thanks for the suggestion.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
Locked