2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-11 21:04:42 +08:00

reset bounce score when email is successfully changed

This commit is contained in:
Régis Hanol 2017-02-20 10:37:01 +01:00
parent 4f32d9e9f7
commit cb99f59ec3
7 changed files with 19 additions and 5 deletions

View file

@ -77,6 +77,10 @@ class UserStat < ActiveRecord::Base
cache_last_seen(Time.now.to_f)
end

def reset_bounce_score!
update_columns(reset_bounce_score_after: nil, bounce_score: 0)
end

protected

def trigger_badges