Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
1b0198f1
Commit
1b0198f1
authored
Aug 31, 2012
by
Florian Unglaub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save newly created users directly in the model
parent
6d6c7a17
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
app/controllers/omniauth_callbacks_controller.rb
app/controllers/omniauth_callbacks_controller.rb
+0
-1
app/models/user.rb
app/models/user.rb
+2
-0
No files found.
app/controllers/omniauth_callbacks_controller.rb
View file @
1b0198f1
...
...
@@ -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
...
...
app/models/user.rb
View file @
1b0198f1
...
...
@@ -114,6 +114,8 @@ class User < ActiveRecord::Base
)
@user
.
blocked
=
true
if
Gitlab
.
config
.
omniauth
.
block_auto_created_users
@user
.
save!
@user
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment