Skip to content

Commit

Permalink
Check if confirmable is active before skipping confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-besnard committed Jan 31, 2015
1 parent 9425497 commit 9bc64e4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def omniauth_success
extra_params = whitelisted_params
@resource.assign_attributes(extra_params) if extra_params

# don't send confirmation email!!!
@resource.skip_confirmation!
if resource_class.devise_modules.include?(:confirmable)
# don't send confirmation email!!!
@resource.skip_confirmation!
end

sign_in(:user, @resource, store: false, bypass: false)

Expand Down

0 comments on commit 9bc64e4

Please sign in to comment.