mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: Reserved usernames
A list of usernames that will be blocked from being used to sign up.
This commit is contained in:
@ -231,6 +231,10 @@ class UsersController < ApplicationController
|
||||
return fail_with("login.password_too_long")
|
||||
end
|
||||
|
||||
if SiteSetting.reserved_usernames.include? params[:username].downcase
|
||||
return fail_with("login.reserved_username")
|
||||
end
|
||||
|
||||
user = User.new(user_params)
|
||||
|
||||
# Handle custom fields
|
||||
|
Reference in New Issue
Block a user