From b7dcbb5e5478e1bca3fa53e6a96f47ff58d41625 Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Fri, 25 Jun 2021 12:10:20 +0300 Subject: [PATCH] format --- lib/plausible_web/controllers/auth_controller.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plausible_web/controllers/auth_controller.ex b/lib/plausible_web/controllers/auth_controller.ex index 56e7c1e97869..1a9556bcca0b 100644 --- a/lib/plausible_web/controllers/auth_controller.ex +++ b/lib/plausible_web/controllers/auth_controller.ex @@ -156,11 +156,13 @@ defmodule PlausibleWeb.AuthController do def activate(conn, %{"code" => code}) do user = conn.assigns[:current_user] + has_invitation = Repo.exists?( from i in Plausible.Auth.Invitation, where: i.email == ^user.email ) + {code, ""} = Integer.parse(code) case Auth.verify_email(user, code) do