summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2016-10-10 16:54:55 +0200
committerBryce Johnson <bryce@gitlab.com>2016-10-15 08:28:55 +0200
commit5439bd9f952c7e7ee9fa10613655a9761396e1f9 (patch)
treed1b9bc3462d99a6571a5f7107a35216e87af7d3d /app/controllers/users_controller.rb
parent85db5ba847ffc8f4b71ad9fe0ba22ab42f90b3e4 (diff)
downloadgitlab-ce-5439bd9f952c7e7ee9fa10613655a9761396e1f9.tar.gz
Attempt to fix username validation ruby.
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 7a2bd83f22f..1aa22995692 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: User.where(username: params[:username].to_s).any? }
+ render json: { exists: !Namespace.where(name: params[:username]).nil? }
end
private