Skip to content

Commit

Permalink
fix: Disable user confirmations when confirmation code (#35)
Browse files Browse the repository at this point in the history
* fix: Disable user confirmations when confirmation code

* lint: Fix rubocop offenses
  • Loading branch information
Quentinchampenois authored Nov 14, 2023
1 parent e3f7843 commit c74d596
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ module RegistrationsRedirect
extend ActiveSupport::Concern

included do
def show
if Decidim::FriendlySignup.use_confirmation_codes.present?
respond_with_navigational(resource) { redirect_to decidim.new_user_confirmation_path }
return
end

super
end

def after_sign_up_path_for(user)
codes_confirmation_path(user) || super(user)
end
Expand Down

0 comments on commit c74d596

Please sign in to comment.