Sha256: 3c4765924b5bbf897717c47c87781faa1c58cdce11d2d802a437566ece19c9ec
Contents?: true
Size: 1.1 KB
Versions: 55
Compression:
Stored size: 1.1 KB
Contents
module ThinkFeelDoEngine module Participants # Customize Participant password actions. class PasswordsController < Devise::PasswordsController # PUT /resource/password def update participant = Participant .with_reset_password_token( params[:participant][:reset_password_token] ) if participant && !participant.active_membership msg = "We're sorry, but you can't sign in yet because you are not " \ "assigned to an active group." redirect_to new_participant_session_path, alert: msg else super do |resource| ParticipantLoginEvent.create(participant_id: resource.id) end end end def create @participant = Participant.find_by(email: resource_params[:email]) if @participant.try(:is_not_allowed_in_site) msg = "New password cannot be sent; this account is not active." redirect_to new_participant_session_path, alert: msg else super end end end end end
Version data entries
55 entries across 55 versions & 1 rubygems