mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 12:54:51 +08:00
Stop sso login processing after rendering error
This prevents a DoubleRenderError triggered on the redirect_to.
This commit is contained in:
@ -72,6 +72,7 @@ class SessionController < ApplicationController
|
||||
|
||||
if SiteSetting.must_approve_users? && !user.approved?
|
||||
render text: I18n.t("sso.account_not_approved"), status: 403
|
||||
return
|
||||
else
|
||||
log_on_user user
|
||||
end
|
||||
|
Reference in New Issue
Block a user