From bf3150ddc8e105910973cc48b7148f10b8acca1d Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Sat, 27 Jun 2020 16:44:46 +0100 Subject: [PATCH] Delete spree_user_signup which is from spree promotions code that we dont use --- app/controllers/spree/user_registrations_controller.rb | 1 - app/controllers/user_registrations_controller.rb | 1 - lib/spree/core/controller_helpers/order.rb | 9 --------- 3 files changed, 11 deletions(-) diff --git a/app/controllers/spree/user_registrations_controller.rb b/app/controllers/spree/user_registrations_controller.rb index a55d327ae2..98ad3c8d1c 100644 --- a/app/controllers/spree/user_registrations_controller.rb +++ b/app/controllers/spree/user_registrations_controller.rb @@ -23,7 +23,6 @@ module Spree if resource.save set_flash_message(:notice, :signed_up) sign_in(:spree_user, @user) - session[:spree_user_signup] = true associate_user respond_with resource, location: after_sign_up_path_for(resource) else diff --git a/app/controllers/user_registrations_controller.rb b/app/controllers/user_registrations_controller.rb index d6fdf5ac76..f02309bf71 100644 --- a/app/controllers/user_registrations_controller.rb +++ b/app/controllers/user_registrations_controller.rb @@ -16,7 +16,6 @@ class UserRegistrationsController < Spree::UserRegistrationsController return render_error(@user.errors) end - session[:spree_user_signup] = true session[:confirmation_return_url] = params[:return_url] associate_user diff --git a/lib/spree/core/controller_helpers/order.rb b/lib/spree/core/controller_helpers/order.rb index 0d979b33d6..1df01e286a 100644 --- a/lib/spree/core/controller_helpers/order.rb +++ b/lib/spree/core/controller_helpers/order.rb @@ -65,15 +65,6 @@ module Spree end end - # This will trigger any "first order" promotions to be triggered - # Assuming of course that this session variable was set correctly in - # the authentication provider's registrations controller - if session[:spree_user_signup] && @order - fire_event('spree.user.signup', user: spree_current_user, - order: @order) - session[:spree_user_signup] = nil - end - session[:guest_token] = nil end