mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: automatically unstage user when signing in using OAuth
This commit is contained in:
parent
332a1ea87e
commit
841f36b058
1 changed files with 5 additions and 3 deletions
|
@ -104,9 +104,11 @@ class Users::OmniauthCallbacksController < ApplicationController
|
|||
end
|
||||
|
||||
def user_found(user)
|
||||
# automatically activate any account if a provider marked the email valid
|
||||
if !user.active && @auth_result.email_valid
|
||||
user.toggle(:active).save
|
||||
# automatically activate/unstage any account if a provider marked the email valid
|
||||
if @auth_result.email_valid
|
||||
user.staged = false
|
||||
user.active = true
|
||||
user.save
|
||||
end
|
||||
|
||||
if ScreenedIpAddress.should_block?(request.remote_ip)
|
||||
|
|
Loading…
Reference in a new issue