FEATURE: Reserved usernames

A list of usernames that will be blocked from being used to sign up.
This commit is contained in:
Kane York
2015-07-01 13:44:53 -07:00
parent 73e68271eb
commit df988a20eb
4 changed files with 17 additions and 0 deletions

View File

@ -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