mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-13 19:36:46 +00:00
(cherry picked from commit fd57b5354b)
Co-authored-by: Jacob Felknor <jacobfelknor073@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9705ea90c2
commit
bb576b16d8
@@ -61,7 +61,10 @@ if settings.LDAP_AUTH:
|
|||||||
user.save()
|
user.save()
|
||||||
|
|
||||||
# if they got an email address from LDAP, create it now and make it the primary
|
# if they got an email address from LDAP, create it now and make it the primary
|
||||||
if user.email:
|
if (
|
||||||
|
user.email
|
||||||
|
and not EmailAddress.objects.filter(user=user, email=user.email).exists()
|
||||||
|
):
|
||||||
EmailAddress.objects.create(user=user, email=user.email, primary=True)
|
EmailAddress.objects.create(user=user, email=user.email, primary=True)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user