闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
442 B

  1. # frozen_string_literal: true
  2. module Admin
  3. class ResetsController < BaseController
  4. before_action :set_user
  5. def create
  6. authorize @user, :reset_password?
  7. @user.send_reset_password_instructions
  8. log_action :reset_password, @user
  9. redirect_to admin_accounts_path
  10. end
  11. private
  12. def set_user
  13. @user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound)
  14. end
  15. end
  16. end