From ed1cd9885828e820095374d56d79604b8cc94858 Mon Sep 17 00:00:00 2001 From: Bryce Johnson Date: Thu, 17 Nov 2016 19:55:59 +0100 Subject: Check all namespaces on validation of new username. --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c4508ccc3b9..6e29f1e8a65 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -86,7 +86,7 @@ class UsersController < ApplicationController end def exists - render json: { exists: Namespace.where(path: params[:username].downcase).any? } + render json: { exists: !!Namespace.find_by_path_or_name(params[:username]) } end private -- cgit v1.2.1