mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 17:26:29 +08:00
FIX: site_contact_user should default to system user, not first admin user
This commit is contained in:
@ -272,7 +272,7 @@ module Discourse
|
||||
# Either returns the site_contact_username user or the first admin.
|
||||
def self.site_contact_user
|
||||
user = User.find_by(username_lower: SiteSetting.site_contact_username.downcase) if SiteSetting.site_contact_username.present?
|
||||
user ||= User.admins.real.order(:id).first
|
||||
user ||= (system_user || User.admins.real.order(:id).first)
|
||||
end
|
||||
|
||||
SYSTEM_USER_ID ||= -1
|
||||
|
Reference in New Issue
Block a user