From: rinpatch Date: Tue, 19 Nov 2019 16:22:20 +0000 (+0300) Subject: User: Don't let deactivated users authenticate. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ff4af8c5ee9e332dfb0491068190143e07186481;p=akkoma User: Don't let deactivated users authenticate. --- 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)