mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Support for a new site setting: newuser_spam_host_threshold
. If a new user posts a link
to the same host enough tiles, they will not be able to post the same link again. Additionally, the site will flag all their previous posts with links as spam and they will be instantly hidden via the auto hide workflow.
This commit is contained in:
@ -73,6 +73,12 @@ module Discourse
|
||||
end
|
||||
end
|
||||
|
||||
# Either returns the system_username user or the first admin.
|
||||
def self.system_user
|
||||
user = User.where(username_lower: SiteSetting.system_username).first if SiteSetting.system_username.present?
|
||||
user = User.admins.order(:id).first if user.blank?
|
||||
user
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
Reference in New Issue
Block a user