diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/auth.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index a339ec4a6fc..e9305b40836 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -6,7 +6,7 @@ module Gitlab def user_project if @project ||= current_user.projects.find_by_id(params[:id]) || - current_user.projects.find_by_code(params[:id]) + current_user.projects.find_by_path(params[:id]) else not_found! end diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index 5a24c5d01b5..056fb034daf 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -34,6 +34,7 @@ module Gitlab extern_uid: uid, provider: provider, name: name, + username: email.match(/^[^@]*/)[0], email: email, password: password, password_confirmation: password, |