Add password reset for users from admin accounts area (#1841)
This commit is contained in:
parent
9d2f55ecc3
commit
6670e6d33f
4 changed files with 47 additions and 8 deletions
18
app/controllers/admin/resets_controller.rb
Normal file
18
app/controllers/admin/resets_controller.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class ResetsController < BaseController
|
||||
before_action :set_account
|
||||
|
||||
def create
|
||||
@account.user.send_reset_password_instructions
|
||||
redirect_to admin_accounts_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue