BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
omniauth_callbacks_controller.rb
app/controllers/omniauth_callbacks_controller.rb
+0
-1
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
...
@@ -39,7 +39,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
redirect_to
profile_path
redirect_to
profile_path
else
else
@user
=
User
.
find_or_new_for_omniauth
(
oauth
)
@user
=
User
.
find_or_new_for_omniauth
(
oauth
)
@user
.
save!
if
@user
.
try
(
'new_record?'
)
if
@user
if
@user
sign_in_and_redirect
@user
sign_in_and_redirect
@user
...
...
app/models/user.rb
View file @
1b0198f1
...
@@ -114,6 +114,8 @@ class User < ActiveRecord::Base
...
@@ -114,6 +114,8 @@ class User < ActiveRecord::Base
)
)
@user
.
blocked
=
true
if
Gitlab
.
config
.
omniauth
.
block_auto_created_users
@user
.
blocked
=
true
if
Gitlab
.
config
.
omniauth
.
block_auto_created_users
@user
.
save!
@user
@user
end
end
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