Skip to content

Commit

Permalink
Merge pull request #125 from nicolas-besnard/ConfirmationOmniauth
Browse files Browse the repository at this point in the history
Check if confirmable is active before skipping confirmation
  • Loading branch information
lynndylanhurley committed Jan 31, 2015
2 parents 9425497 + 9bc64e4 commit b40c233
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 b40c233

Please sign in to comment.