Skip to Content Skip to Search
Methods
S
Included Modules

Instance Public methods

show()

GET /member/confirmation?member_id=1234&token=abcdef&plan_id=1234 This isn’t an email confirmation action anymore. Instead, it allows the member to automatically log in after clicking on the link provided in the invite email.

# File engines/member/app/controllers/member/confirmations_controller.rb, line 8
def show
  @member = current_site.members.find_by(id: confirmations_params[:member_id])

  if @member && !@member.approved?
    redirect_not_allowed("log_in_denied_error")
  elsif @member && secure_token_valid?(@member)
    @member.update_attribute(:confirmation_digest, nil)
    after_confirmation(@member, confirmations_params[:plan_id])
  elsif current_member
    after_confirmation(current_member, confirmations_params[:plan_id])
  else
    redirect_not_allowed("confirmation_expired_error")
  end
end