Skip to content

Commit 0c08b56

Browse files
authored
Merge pull request #1924 from GSA/email_check_restored
fix email check
2 parents b921c1b + 1826642 commit 0c08b56

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/dao/users_dao.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ def get_login_gov_user(login_uuid, email_address):
5454

5555
return user
5656

57+
# Handle the case of the brand new user. We know their email from the
58+
# invitation but need to related the login_uuid to it.
59+
stmt = select(User).where(User.email_address.ilike(email_address))
60+
user = db.session.execute(stmt).scalars().first()
61+
5762
if user:
5863
save_user_attribute(user, {"login_uuid": login_uuid})
5964
return user

0 commit comments

Comments
 (0)