FIX: confirm email token for user created via social login

This commit is contained in:
Arpit Jalan 2017-04-12 23:59:32 +05:30
parent bda20cc44a
commit 7fb17b83c4
1 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,8 @@ class Users::OmniauthCallbacksController < ApplicationController
def user_found(user)
# automatically activate/unstage any account if a provider marked the email valid
if @auth_result.email_valid && @auth_result.email == user.email
user.update!(staged: false, active: true)
user.update!(staged: false)
user.activate
end
if ScreenedIpAddress.should_block?(request.remote_ip)