FEATURE: Allow plugins to manipulate site settings during backup restore

This commit is contained in:
Gerhard Schlager 2019-08-22 22:41:19 +02:00
parent 34a76bf106
commit 1f118b1309
1 changed files with 2 additions and 0 deletions

View File

@ -412,6 +412,8 @@ module BackupRestore
log "Reloading site settings..."
SiteSetting.refresh!
DiscourseEvent.trigger(:site_settings_restored)
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