mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:51:07 +08:00
invite only forums had very wonky logic, invited users were not being activated, invite_only forums were still registering users
This commit is contained in:
@ -110,4 +110,16 @@ module DiscourseHub
|
||||
def self.accepts
|
||||
[:json, 'application/vnd.discoursehub.v1']
|
||||
end
|
||||
|
||||
def self.nickname_operation
|
||||
if SiteSetting.call_discourse_hub?
|
||||
begin
|
||||
yield
|
||||
rescue DiscourseHub::NicknameUnavailable
|
||||
false
|
||||
rescue => e
|
||||
Rails.logger.error e.message + "\n" + e.backtrace.join("\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user