2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-08 12:06:51 +08:00

Add an sso option to suppress welcome emails

As discussed here: https://meta.discourse.org/t/create-new-sso-users-without-sending-welcome-emails/24894
This commit is contained in:
Dan Singerman 2015-03-20 17:03:24 +00:00
parent 605fe4b11d
commit e8648350eb
3 changed files with 25 additions and 3 deletions

View file

@ -60,7 +60,7 @@ class DiscourseSingleSignOn < SingleSignOn
if sso_record && (user = sso_record.user) && !user.active
user.active = true
user.save!
user.enqueue_welcome_message('welcome_user')
user.enqueue_welcome_message('welcome_user') unless suppress_welcome_message
end
custom_fields.each do |k,v|