FIX: Restoring backup shouldn't change disable_emails from "yes" to "non-staff"
This commit is contained in:
parent
ac27bdce14
commit
3aca070311
|
@ -403,7 +403,7 @@ module BackupRestore
|
||||||
log "Reloading site settings..."
|
log "Reloading site settings..."
|
||||||
SiteSetting.refresh!
|
SiteSetting.refresh!
|
||||||
|
|
||||||
if @disable_emails
|
if @disable_emails && SiteSetting.disable_emails == 'no'
|
||||||
log "Disabling outgoing emails for non-staff users..."
|
log "Disabling outgoing emails for non-staff users..."
|
||||||
user = User.find_by_email(@user_info[:email]) || Discourse.system_user
|
user = User.find_by_email(@user_info[:email]) || Discourse.system_user
|
||||||
SiteSetting.set_and_log(:disable_emails, 'non-staff', user)
|
SiteSetting.set_and_log(:disable_emails, 'non-staff', user)
|
||||||
|
|
Loading…
Reference in New Issue