- Used Zammad version: 3.5.0
- Used Zammad installation source: source
- Operating system: Debian GNU/Linux 10
- Browser + version: Google Chrome Version 86.0.4240.183 (Offizieller Build) (64-Bit)
we are using zammad with an active directory(AD). For ldap integration we map attribute userprinciplename to login. Now users can login with email@example.com and their password.
What we would like to achieve is to cut off the domain part.
I found topic Change LDAP-Integration UID value
Setting.get(‘ldap_config’)[‘user_attributes’][‘userprincipalname’] is mapped to ‘login’
User.find(18777).login.split(’@’) returns the user without the domain part.
I’m struggling how to do, if possible, Setting.set(‘ldap_config’)… in order to get [‘user_attributes’][‘userprincipalname’].split(’@’) mapped to the login attribute.
Sorry I am not a ruby programmer and I do not know if it is a good idea to achieve this through manipulating the settings.
We could also use another ldap attribute like uid, but this attribute could get updated by everyone with AD permissions.
It would be great to get some help how to solve this.
Thank you and regards,
- ldap sync imports abc-xyz-u1 to login from userprinciplename
- ldap sync imports firstname.lastname@example.org to login from userprinciplename