mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 17:02:45 +08:00
BUGFIX: sso to send welcome emails
This commit is contained in:
parent
74a1145a0b
commit
50a8d3caae
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user