User: Don't let deactivated users authenticate.

This commit is contained in:
lain 2019-11-11 12:37:13 +01:00
commit 8521553ad9
2 changed files with 10 additions and 0 deletions

View 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])