demarches-normaliennes/app/controllers/manager/users_controller.rb
Pierre de La Morinerie 7ca476fc61 manager: add confirmation email actions for the User
- Allow to re-send the confirmation email
- Allow to confirm the email address manually
2018-07-17 12:10:56 +02:00

17 lines
563 B
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Manager
class UsersController < Manager::ApplicationController
def resend_confirmation_instructions
user = User.find(params[:id])
user.resend_confirmation_instructions
flash[:notice] = "Le message de confirmation de ladresse email a été renvoyé."
redirect_to manager_user_path(user)
end
def confirm
user = User.find(params[:id])
user.confirm
flash[:notice] = "Ladresse email de lutilisateur a été marquée comme confirmée."
redirect_to manager_user_path(user)
end
end
end