Skip to content

Commit

Permalink
Fix unconfirmed accounts being registered as active users (#23803)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Mar 13, 2023
1 parent f5f17e8 commit 675c24a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/user.rb
Expand Up @@ -504,11 +504,14 @@ def sanitize_role
def prepare_new_user!
BootstrapTimelineWorker.perform_async(account_id)
ActivityTracker.increment('activity:accounts:local')
ActivityTracker.record('activity:logins', id)
UserMailer.welcome(self).deliver_later
TriggerWebhookWorker.perform_async('account.approved', 'Account', account_id)
end

def prepare_returning_user!
return unless confirmed?

ActivityTracker.record('activity:logins', id)
regenerate_feed! if needs_feed_update?
end
Expand Down

0 comments on commit 675c24a

Please sign in to comment.