0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 18:50:27 +01:00

If wizard is required add a redirect_to after signup

Dieser Commit ist enthalten in:
Angus McLeod 2018-05-24 15:32:51 +10:00
Ursprung a9b5c2700c
Commit 6d769a5392

Datei anzeigen

@ -10,7 +10,16 @@ require_dependency 'wizard/step'
custom_redirect = nil custom_redirect = nil
if user && wizard_id = CustomWizard::Wizard.after_signup if user && wizard_id = CustomWizard::Wizard.after_signup
custom_redirect = wizard_id.dasherize custom_redirect = wizard_id
wizard = CustomWizard::Wizard.new(user, id: wizard_id)
data = PluginStore.get('custom_wizard', wizard_id)
if data['required']
user.custom_fields['redirect_to_wizard'] = wizard_id
user.save_custom_fields(true)
end
if CustomWizard::Wizard.new(user, id: wizard_id).completed? if CustomWizard::Wizard.new(user, id: wizard_id).completed?
custom_redirect = nil custom_redirect = nil