Browse Source

Fix unconfirmed accounts being registered as active users (#23803)

closed-social-glitch-2
Claire 1 year ago
committed by GitHub
parent
commit
86f8aa2db2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      app/models/user.rb

+ 3
- 0
app/models/user.rb View File

@ -507,11 +507,14 @@ class User < ApplicationRecord
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

Loading…
Cancel
Save