summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-11-19 19:22:20 +0300
committerrinpatch <rinpatch@sdf.org>2019-11-19 19:22:20 +0300
commitff4af8c5ee9e332dfb0491068190143e07186481 (patch)
tree5aded70ca2da21d18d1544443631933bea2ba951
parent3527a03e58eba62fe36366c7b8dd5785c682d264 (diff)
User: Don't let deactivated users authenticate.
-rw-r--r--lib/pleroma/user.ex2
1 files changed, 2 insertions, 0 deletions
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)