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:
Ursprung
a9b5c2700c
Commit
6d769a5392
1 geänderte Dateien mit 10 neuen und 1 gelöschten Zeilen
|
@ -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
|
||||||
|
|
Laden …
In neuem Issue referenzieren