diff options
author | lain <lain@soykaf.club> | 2019-11-11 12:37:13 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-11-11 12:37:38 +0100 |
commit | 8521553ad92981e9939ce6ce2208db685ecd068c (patch) | |
tree | fafe13d83a09b140f20e961b2d6891dcb65337a8 /lib/pleroma | |
parent | 7438c177d9f57e8779b979ca553c3b501726efb3 (diff) | |
download | pleroma-8521553ad92981e9939ce6ce2208db685ecd068c.tar.gz |
User: Don't let deactivated users authenticate.
Diffstat (limited to 'lib/pleroma')
-rw-r--r-- | lib/pleroma/user.ex | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index f8c2db1e1..fcb1d5143 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -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]) |