mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
BUGFIX: sso to respect must_approve_users
This commit is contained in:
@ -31,7 +31,11 @@ class SessionController < ApplicationController
|
|||||||
sso.expire_nonce!
|
sso.expire_nonce!
|
||||||
|
|
||||||
if user = sso.lookup_or_create_user
|
if user = sso.lookup_or_create_user
|
||||||
log_on_user user
|
if SiteSetting.must_approve_users? && !user.approved?
|
||||||
|
# TODO: need an awaiting approval message here
|
||||||
|
else
|
||||||
|
log_on_user user
|
||||||
|
end
|
||||||
redirect_to return_path
|
redirect_to return_path
|
||||||
else
|
else
|
||||||
render text: "unable to log on user", status: 500
|
render text: "unable to log on user", status: 500
|
||||||
|
Reference in New Issue
Block a user