BUGFIX: sso to respect must_approve_users

This commit is contained in:
Sam 2014-02-26 10:27:39 +11:00
parent 440435f023
commit 74a1145a0b

View file

@ -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