app/controllers/workarea/admin/impersonations_controller.rb in workarea-admin-3.4.45 vs app/controllers/workarea/admin/impersonations_controller.rb in workarea-admin-3.5.0.beta.1
- old
+ new
@@ -20,16 +20,15 @@
)
redirect_to storefront.users_account_path
end
def destroy
- previous_user_id = cookies.signed[:user_id]
+ previous_user_id = session[:user_id]
stop_impersonation
- self.current_order = nil
+ clear_current_order
flash[:success] = t('workarea.admin.users.flash_messages.stopped')
- referrer = URI.parse(request.referrer).request_uri rescue nil
- redirect_back_or(referrer.presence || user_path(previous_user_id))
+ redirect_to user_path(previous_user_id)
end
end
end
end