diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 7b53e2a9e..1ee7a70df 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,5 +1,5 @@ class UsersController < ApplicationController - before_action :set_user, only: [ :show, :edit, :update, :destroy, :generate_facilitator, :toggle_lock_status ] + before_action :set_user, only: [ :show, :edit, :update, :destroy, :generate_facilitator, :toggle_lock_status, :send_reset_password_instructions ] def index return redirect_to root_path unless current_user.super_user? @@ -97,6 +97,11 @@ def generate_facilitator end end + def send_reset_password_instructions + @user.send_reset_password_instructions + redirect_to users_path, notice: "Reset password instructions sent to #{@user.email}." + end + def toggle_lock_status return redirect_to users_path, alert: "You don't have permission to perform this action." unless current_user.super_user? diff --git a/app/views/events/_card.html.erb b/app/views/events/_card.html.erb index 4b6e82c8c..66a4af58b 100644 --- a/app/views/events/_card.html.erb +++ b/app/views/events/_card.html.erb @@ -70,7 +70,7 @@ <% if event.event_registrations.exists?(registrant_id: current_user.id) %>