Skip to content
Snippets Groups Projects
Commit 1b0198f1 authored by Florian Unglaub's avatar Florian Unglaub
Browse files

save newly created users directly in the model

parent 6d6c7a17
No related branches found
No related tags found
1 merge request!1248Omniauth Support
Loading
Loading
@@ -39,7 +39,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
redirect_to profile_path
else
@user = User.find_or_new_for_omniauth(oauth)
@user.save! if @user.try('new_record?')
 
if @user
sign_in_and_redirect @user
Loading
Loading
Loading
Loading
@@ -114,6 +114,8 @@ class User < ActiveRecord::Base
)
 
@user.blocked = true if Gitlab.config.omniauth.block_auto_created_users
@user.save!
@user
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment