Can't login when user have multiple e-mail addresses - login screen says "Invalid User Email"
Expected behavior
When there are multiple e-mail addresses in LDAP, first one should be taken by default. Alternatively, there should be option to specify which field should be used as e-mail addresses (e.g our AD has custom field with preferred e-mail).
Steps to reproduce the behavior
Configure LDAP authentication
Add user with multiple values in mail field
Try to login as this user.
Possible resolution
In server/libs/auth.js in LDAP section I added
if (Array.isArray(profile.mail)) {
profile.mail = profile.mail.shift()
}
Actual behavior
Can't login when user have multiple e-mail addresses - login screen says "Invalid User Email"
Expected behavior
When there are multiple e-mail addresses in LDAP, first one should be taken by default. Alternatively, there should be option to specify which field should be used as e-mail addresses (e.g our AD has custom field with preferred e-mail).
Steps to reproduce the behavior
mail
fieldPossible resolution
In server/libs/auth.js in LDAP section I added
Works as expected.