mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Allow request to specify a return value when calling user_passwords#edit
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
class UserPasswordsController < Spree::UserPasswordsController
|
||||
layout 'darkswarm'
|
||||
|
||||
before_filter :set_admin_redirect, only: :edit
|
||||
|
||||
def create
|
||||
self.resource = resource_class.send_reset_password_instructions(params[resource_name])
|
||||
|
||||
@@ -18,4 +20,10 @@ class UserPasswordsController < Spree::UserPasswordsController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_admin_redirect
|
||||
session["spree_user_return_to"] = params[:return_to] if params[:return_to]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user