diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-23 21:11:09 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-23 21:11:09 +0300 |
commit | c50ec72b52e9ed7270f7c81c2c71fd8e5a28eeb0 (patch) | |
tree | 48c30a44b85b84a4231bff84e51133e7812b55ca /lib | |
parent | ab9d02365181df373beffbe7732b36b9b3f7a307 (diff) | |
download | gitlab-ce-c50ec72b52e9ed7270f7c81c2c71fd8e5a28eeb0.tar.gz |
Deprecate code for Project. Use title and path
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, |