mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 20:21:25 +08:00
FIX: always unstage users when they log in
This commit is contained in:
@ -125,7 +125,8 @@ class Users::OmniauthCallbacksController < ApplicationController
|
||||
|
||||
# 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)
|
||||
user.unstage
|
||||
user.save
|
||||
|
||||
# ensure there is an active email token
|
||||
unless EmailToken.where(email: user.email, confirmed: true).exists? ||
|
||||
|
Reference in New Issue
Block a user