BUGFIX: sso to send welcome emails

This commit is contained in:
Sam 2014-02-26 10:28:03 +11:00
parent 74a1145a0b
commit 50a8d3caae
2 changed files with 7 additions and 0 deletions

View File

@ -66,6 +66,12 @@ class DiscourseSingleSignOn < SingleSignOn
end
end
if sso_record && (user = sso_record.user) && !user.active
user.active = true
user.save
user.enqueue_welcome_message('welcome_user')
end
sso_record && sso_record.user
end
end

View File

@ -57,6 +57,7 @@ describe SessionController do
logged_on_user.username.should == 'sam'
logged_on_user.single_sign_on_record.external_id.should == "666"
logged_on_user.active.should == true
end
it 'allows login to existing account with valid nonce' do