Skip to content

Commit

Permalink
fix: place user reset after new email logic (#16786)
Browse files Browse the repository at this point in the history
  • Loading branch information
miketheman authored Sep 24, 2024
1 parent 85bb371 commit 30bca25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion warehouse/admin/views/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,6 @@ def user_recover_account_complete(user: User, request):
user.totp_secret = None
user.webauthn = []
user.recovery_codes = []
_user_reset_password(user, request)

for account_recovery in user.active_account_recoveries:
account_recovery.additional["status"] = "completed"
Expand All @@ -585,6 +584,8 @@ def user_recover_account_complete(user: User, request):
email.primary = True
email.verified = True

_user_reset_password(user, request)

request.session.flash(
(
"Account Recovery Complete, "
Expand Down

0 comments on commit 30bca25

Please sign in to comment.