Skip to content

Commit

Permalink
fix: Send create user email for password resets where we have an emai…
Browse files Browse the repository at this point in the history
…l and person, but no user account

This fixes ietf-tools#6458
  • Loading branch information
ThisIsMissEm committed Jul 21, 2024
1 parent aa36f48 commit 62fafbe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ietf/ietfauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,11 @@ def password_reset(request):
if not user:
# try to find user ID from the email address
email = Email.objects.filter(address=submitted_username).first()
if email and email.person and email.person.user:
user = email.person.user
if email and email.person:
if email.person.user:
user = email.person.user
else:
send_account_creation_email(request, email.email_address())

if user and user.person.email_set.filter(active=True).exists():
data = {
Expand Down

0 comments on commit 62fafbe

Please sign in to comment.