OAuthPlug, Router: Handle deactivated users in the UserEnabledPlug
[akkoma] / lib / pleroma / user.ex
index f8c2db1e1ebc3b1128c288db28f2229970d1c779..fcb1d5143942bc7738aff01ca8ecf70ca7166181 100644 (file)
@@ -124,6 +124,9 @@ defmodule Pleroma.User do
     timestamps()
   end
 
+  @doc "Returns if the user should be allowed to authenticate"
+  def auth_active?(%User{deactivated: true}), do: false
+
   def auth_active?(%User{confirmation_pending: true}),
     do: !Pleroma.Config.get([:instance, :account_activation_required])