[Solved] Disable Customer Login with no email associated

Moderator: crythias

Post Reply
chrotha
Znuny newbie
Posts: 93
Joined: 29 Jun 2018, 13:44
Znuny Version: 6.x.x/7.0.x
Real Name: Ruben Sardinha

[Solved] Disable Customer Login with no email associated

Post by chrotha »

Hey everyone,

As the title suggests, I'm trying to block the user from logging in, if he has no email associated in the Customer User information.
The Information is being mapped from the Active Directory and I don't have control over it. There are a few users that have all the information filled (Login, FirstName, LastName and customerID) but are lacking the email address and are able to login.
My question is, how do I block someone from logging in if the email is not present on the AD?
Also, I have a few user that have no email associated, but I need to create tickets in their name. They don't login on the platform using the Customer.pl portal so I have to be able to see those users, so the "AlwaysFilter=> (mail=*)" can't be used in this situation.

I'm using OTRS 6 with RHEL.

Thanks in advance.
Last edited by chrotha on 10 Aug 2021, 10:43, edited 1 time in total.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Disable Customer Login with no email associated

Post by root »

Hi,

There's also an AlwaysFilter which only affects the authentication. Keep them in your CustomerUser configuration without this value and set the AlwaysFilter for the customer auth module to '(mail=*)'.

Code: Select all

$Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = '';
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
chrotha
Znuny newbie
Posts: 93
Joined: 29 Jun 2018, 13:44
Znuny Version: 6.x.x/7.0.x
Real Name: Ruben Sardinha

Re: Disable Customer Login with no email associated

Post by chrotha »

Hey Roy,

Thanks for the reply, it worked as intended.
Post Reply