Fix unconfirmed accounts being registered as active users (#23803)
This commit is contained in:
parent
f5f17e897b
commit
675c24a34e
1 changed files with 3 additions and 0 deletions
|
@ -504,11 +504,14 @@ class User < ApplicationRecord
|
||||||
def prepare_new_user!
|
def prepare_new_user!
|
||||||
BootstrapTimelineWorker.perform_async(account_id)
|
BootstrapTimelineWorker.perform_async(account_id)
|
||||||
ActivityTracker.increment('activity:accounts:local')
|
ActivityTracker.increment('activity:accounts:local')
|
||||||
|
ActivityTracker.record('activity:logins', id)
|
||||||
UserMailer.welcome(self).deliver_later
|
UserMailer.welcome(self).deliver_later
|
||||||
TriggerWebhookWorker.perform_async('account.approved', 'Account', account_id)
|
TriggerWebhookWorker.perform_async('account.approved', 'Account', account_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def prepare_returning_user!
|
def prepare_returning_user!
|
||||||
|
return unless confirmed?
|
||||||
|
|
||||||
ActivityTracker.record('activity:logins', id)
|
ActivityTracker.record('activity:logins', id)
|
||||||
regenerate_feed! if needs_feed_update?
|
regenerate_feed! if needs_feed_update?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue