oauth plug: fix deactivated check
This commit is contained in:
parent
4ac849cb4a
commit
3356c7d1e9
@ -20,7 +20,7 @@ defmodule Pleroma.Plugs.OAuthPlug do
|
|||||||
with token when not is_nil(token) <- token,
|
with token when not is_nil(token) <- token,
|
||||||
%Token{user_id: user_id} <- Repo.get_by(Token, token: token),
|
%Token{user_id: user_id} <- Repo.get_by(Token, token: token),
|
||||||
%User{} = user <- Repo.get(User, user_id),
|
%User{} = user <- Repo.get(User, user_id),
|
||||||
false <- !!user.info["deactivated"] do
|
false <- !!user.info.deactivated do
|
||||||
conn
|
conn
|
||||||
|> assign(:user, user)
|
|> assign(:user, user)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user