mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 18:13:39 +08:00
FIX: Protected method called, I'll fire myself now
This commit is contained in:
parent
82bddcbe51
commit
828cdf3fea
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user