Change user.confirmation_pending field to user.is_confirmed

This commit is contained in:
Mark Felder 2020-10-13 14:29:34 -05:00 committed by Mark Felder
commit d36182c088
29 changed files with 121 additions and 101 deletions

View file

@ -30,7 +30,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
def confirm_email(conn, %{"user_id" => uid, "token" => token}) do
with %User{} = user <- User.get_cached_by_id(uid),
true <- user.local and user.confirmation_pending and user.confirmation_token == token,
true <- user.local and !user.is_confirmed and user.confirmation_token == token,
{:ok, _} <- User.confirm(user) do
redirect(conn, to: "/")
end