mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: automatically unstage user when signing in using OAuth
This commit is contained in:
parent
332a1ea87e
commit
841f36b058
@ -104,9 +104,11 @@ class Users::OmniauthCallbacksController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def user_found(user)
|
def user_found(user)
|
||||||
# automatically activate any account if a provider marked the email valid
|
# automatically activate/unstage any account if a provider marked the email valid
|
||||||
if !user.active && @auth_result.email_valid
|
if @auth_result.email_valid
|
||||||
user.toggle(:active).save
|
user.staged = false
|
||||||
|
user.active = true
|
||||||
|
user.save
|
||||||
end
|
end
|
||||||
|
|
||||||
if ScreenedIpAddress.should_block?(request.remote_ip)
|
if ScreenedIpAddress.should_block?(request.remote_ip)
|
||||||
|
Loading…
Reference in New Issue
Block a user