Class: Staff::UserPasswordResetsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/staff/user_password_resets_controller.rb

Overview

Allows staff to inititate password resets

Instance Method Summary collapse

Instance Method Details

#createObject



4
5
6
7
8
9
10
# File 'app/controllers/staff/user_password_resets_controller.rb', line 4

def create
  user = User.find(params.require(:user_id))
  user.send_reset_password_instructions
  msg = "Password reset emailed to #{user.email}"
  logger.info msg
  redirect_to staff_user_path(user), notice: msg
end