From 3aca0703116c5d9b776835c5d00c84c4d6592062 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Tue, 16 Apr 2019 11:48:07 +0200 Subject: [PATCH] FIX: Restoring backup shouldn't change disable_emails from "yes" to "non-staff" --- lib/backup_restore/restorer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backup_restore/restorer.rb b/lib/backup_restore/restorer.rb index 57870cfab95..f4f66121b87 100644 --- a/lib/backup_restore/restorer.rb +++ b/lib/backup_restore/restorer.rb @@ -403,7 +403,7 @@ module BackupRestore log "Reloading site settings..." SiteSetting.refresh! - if @disable_emails + if @disable_emails && SiteSetting.disable_emails == 'no' log "Disabling outgoing emails for non-staff users..." user = User.find_by_email(@user_info[:email]) || Discourse.system_user SiteSetting.set_and_log(:disable_emails, 'non-staff', user)