mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
BUGFIX: sso to respect must_approve_users
This commit is contained in:
parent
440435f023
commit
74a1145a0b
1 changed files with 5 additions and 1 deletions
|
@ -31,7 +31,11 @@ class SessionController < ApplicationController
|
|||
sso.expire_nonce!
|
||||
|
||||
if user = sso.lookup_or_create_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
|
||||
else
|
||||
render text: "unable to log on user", status: 500
|
||||
|
|
Loading…
Reference in a new issue