diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 578622fdf..3ce6517a6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -122,9 +122,19 @@ class User < ApplicationRecord update!(disabled: false) end + def confirm + return if confirmed? + + super + update_statistics! + end + def confirm! + return if confirmed? + skip_confirmation! save! + update_statistics! end def promote! @@ -202,4 +212,9 @@ class User < ApplicationRecord def sanitize_languages filtered_languages.reject!(&:blank?) end + + def update_statistics! + BootstrapTimelineWorker.perform_async(account_id) + ActivityTracker.increment('activity:accounts:local') + end end |