This PR fixes an issue where LDAP users without an email address wouldn't be populated in the dns-ui user list on login.
The user is able to log in but prompted with "something went wrong", which turned out to be caused by missing email field in $ldapuser (e.g. $ldapuser['mail']). Checking the field exists resolves the error, and setting the email address to an empty string in this case seems as sensible as anything else.
This was seen using Active Directory LDAP server, which in our case only returns the field for users with an email address assigned.
This PR fixes an issue where LDAP users without an email address wouldn't be populated in the dns-ui user list on login.
The user is able to log in but prompted with "something went wrong", which turned out to be caused by missing email field in
$ldapuser
(e.g.$ldapuser['mail']
). Checking the field exists resolves the error, and setting the email address to an empty string in this case seems as sensible as anything else.This was seen using Active Directory LDAP server, which in our case only returns the field for users with an email address assigned.