Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix login issue for LDAP users without email address #178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ma-evans
Copy link

@ma-evans ma-evans commented Dec 8, 2020

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.

@ma-evans ma-evans marked this pull request as draft December 8, 2020 21:34
@ma-evans ma-evans marked this pull request as ready for review December 8, 2020 23:11
doesn't return an e-mail address for the user.
@ma-evans ma-evans marked this pull request as draft December 8, 2020 23:22
@ma-evans ma-evans marked this pull request as ready for review December 8, 2020 23:22
@ma-evans
Copy link
Author

ma-evans commented Dec 9, 2020

Updated the issue description to better reflect the changes (issue was missing field in $ldapuser, not $config).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant