FIX: Protected method called, I'll fire myself now

This commit is contained in:
Robin Ward 2019-04-03 16:10:36 -04:00
parent 82bddcbe51
commit 828cdf3fea

View File

@ -1213,6 +1213,14 @@ class User < ActiveRecord::Base
next_best_badge_title ? Badge.display_name(next_best_badge_title) : nil
end
def create_reviewable
return unless SiteSetting.must_approve_users? || SiteSetting.invite_only?
return if approved?
Jobs.enqueue(:create_user_reviewable, user_id: self.id)
end
protected
def badge_grant
@ -1242,13 +1250,6 @@ class User < ActiveRecord::Base
Group.user_trust_level_change!(id, trust_level)
end
def create_reviewable
return unless SiteSetting.must_approve_users? || SiteSetting.invite_only?
return if approved?
Jobs.enqueue(:create_user_reviewable, user_id: self.id)
end
def create_user_stat
stat = UserStat.new(new_since: Time.now)
stat.user_id = id