Closed alandmoore closed 8 years ago
Yep, I agree that passing a blank string is a better idea for those fields.
Could you create a PR and I can do some testing on OpenLDAP also.
Thanks Alan
Version 0.9.6 released on PyPi that incorporates the changes from #20.
Thanks Alan
If no email address is specified in AD, django will throw an exception on login because the
User
model doesn't allow an email value ofNone
.In line 34 of backends.py, any missing attributes are filled in with
None
as a value. The default django User model allows blank for first_name, last_name, and email, so I'm wondering if it would be better to default missing attributes to an empty string.There are legitimate cases where an AD user may not have a first name, last name, or email address specified, so it seems like the right thing to just pass that empty field on to the
User
object.Thoughts?