demarches-normaliennes/app/controllers/manager/users_controller.rb
2018-09-20 10:43:07 +02:00

17 lines
550 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] = "L'email d'activation de votre compte 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 activée."
redirect_to manager_user_path(user)
end
end
end