diff options
author | George Andrinopoulos <geoandri@gmail.com> | 2017-03-27 12:37:24 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-03-27 12:37:24 +0300 |
commit | 7c74a0209b2354ee9260bfebe9bbde5cd0c141bf (patch) | |
tree | f98ebab7adf9ca90ab7128c4f9e9605d84b13ae9 /lib/gitlab/o_auth | |
parent | e19d4c511d21e14d2442546a5d00c5fbdf13308a (diff) |
Implement new service for creating user
Diffstat (limited to 'lib/gitlab/o_auth')
-rw-r--r-- | lib/gitlab/o_auth/user.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb index fcf51b7fc5b..f98481c6d3a 100644 --- a/lib/gitlab/o_auth/user.rb +++ b/lib/gitlab/o_auth/user.rb @@ -147,10 +147,8 @@ module Gitlab end def build_new_user - user = ::User.new(user_attributes) - user.skip_confirmation! - user.identities.new(extern_uid: auth_hash.uid, provider: auth_hash.provider) - user + user_params = user_attributes.merge(extern_uid: auth_hash.uid, provider: auth_hash.provider, skip_confirmation: true) + Users::CreateService.new(nil, user_params).build end def user_attributes |