From 57a2042ef63988c7dabb720216579b537a1123cf Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 4 May 2017 12:30:13 -0400 Subject: [PATCH] FIX: Quiet server side errors for requesting json for account-created --- app/controllers/users_controller.rb | 6 +++++- config/site_settings.yml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index dbe6950e8f4..f6b09ca6a8b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -548,7 +548,11 @@ class UsersController < ApplicationController store_preloaded("accountCreated", MultiJson.dump(@account_created)) expires_now - render "default/empty" + + respond_to do |format| + format.html { render "default/empty" } + format.json { render json: success_json } + end end def activate_account diff --git a/config/site_settings.yml b/config/site_settings.yml index b9722e2f444..edc4f37a2bd 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -340,7 +340,7 @@ users: max: 60 reserved_usernames: type: list - default: "admin|moderator|administrator|mod|sys|system|community|info|you|name|username|user|nickname|discourse|discourseorg|discourseforum|support" + default: "admin|moderator|administrator|mod|sys|system|community|info|you|name|username|user|nickname|discourse|discourseorg|discourseforum|support|account-created" min_password_length: client: true default: 10