mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
Invite link can't be used to log in after you set a password or sign in with 3rd party
This commit is contained in:
@ -85,8 +85,8 @@ class Users::OmniauthCallbacksController < ApplicationController
|
||||
# log on any account that is active with forum access
|
||||
if Guardian.new(user).can_access_forum? && user.active
|
||||
log_on_user(user)
|
||||
# don't carry around old auth info, perhaps move elsewhere
|
||||
session[:authentication] = nil
|
||||
Invite.invalidate_for_email(user.email) # invite link can't be used to log in anymore
|
||||
session[:authentication] = nil # don't carry around old auth info, perhaps move elsewhere
|
||||
@data.authenticated = true
|
||||
else
|
||||
if SiteSetting.must_approve_users? && !user.approved?
|
||||
|
Reference in New Issue
Block a user