User: Don't let deactivated users authenticate.
authorrinpatch <rinpatch@sdf.org>
Tue, 19 Nov 2019 16:22:20 +0000 (19:22 +0300)
committerrinpatch <rinpatch@sdf.org>
Tue, 19 Nov 2019 16:22:20 +0000 (19:22 +0300)
lib/pleroma/user.ex

index f0912fb100bfd7ee24d797deafbb6342842fb75a..f5d3245dcf3830d4749ba0227507b09195fdd2dd 100644 (file)
@@ -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)