Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix account activation being triggered before email confirmation #23245

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

ClearlyClaire
Copy link
Contributor

Fixes #23098

When registrations are open and not subject to approval, accounts are activated (User#prepare_new_user! is called, the welcome email is sent, the staff is notified, the account.approved Web Hook is triggered, and if the user was invited, the inviting user is followed) the moment the user confirms their email.

However, when approvals are required, this happens when a moderator approves the user, even if they have not confirmed their email, and should they confirm their email after being approved, their account will be activated twice.

Therefore, this PR changes it so the account is only activated when both confirmed and approved.

@Gargron Gargron merged commit 6883fdd into mastodon:main Jan 24, 2023
btrd pushed a commit to btrd/mastodon that referenced this pull request Feb 22, 2023
…todon#23245)

* Add tests

* Fix account activation being triggered before email confirmation

Fixes mastodon#23098
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug?: account.approved webhook triggered on account still in confirming status
2 participants