From ff4af8c5ee9e332dfb0491068190143e07186481 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 19 Nov 2019 19:22:20 +0300 Subject: [PATCH] User: Don't let deactivated users authenticate. --- lib/pleroma/user.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index f0912fb10..f5d3245dc 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -70,6 +70,8 @@ defmodule Pleroma.User do def auth_active?(%User{info: %User.Info{confirmation_pending: true}}), do: !Pleroma.Config.get([:instance, :account_activation_required]) + def auth_active?(%User{info: %User.Info{deactivated: true}}), do: false + def auth_active?(%User{}), do: true def visible_for?(user, for_user \\ nil) -- 2.45.2