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
1 changed files with 5 additions and 1 deletions

View File

@ -31,7 +31,11 @@ class SessionController < ApplicationController
sso.expire_nonce!
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
else
render text: "unable to log on user", status: 500