mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:49:14 +08:00
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..."
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user