projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3527a03
)
User: Don't let deactivated users authenticate.
author
rinpatch
<rinpatch@sdf.org>
Tue, 19 Nov 2019 16:22:20 +0000
(19:22 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Tue, 19 Nov 2019 16:22:20 +0000
(19:22 +0300)
lib/pleroma/user.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index f0912fb100bfd7ee24d797deafbb6342842fb75a..f5d3245dcf3830d4749ba0227507b09195fdd2dd 100644
(file)
--- 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)