mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 02:49:21 +02:00
lowercase emails on add user to domain; case insensitive match on matching DomainInvitations on login; test cases
This commit is contained in:
parent
d9237c2927
commit
e36351d21e
4 changed files with 52 additions and 1 deletions
|
@ -101,7 +101,7 @@ class User(AbstractUser):
|
|||
"""When a user first arrives on the site, we need to retrieve any domain
|
||||
invitations that match their email address."""
|
||||
for invitation in DomainInvitation.objects.filter(
|
||||
email=self.email, status=DomainInvitation.DomainInvitationStatus.INVITED
|
||||
email__iexact=self.email, status=DomainInvitation.DomainInvitationStatus.INVITED
|
||||
):
|
||||
try:
|
||||
invitation.retrieve()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue