updated error messages for authentication process
This commit is contained in:
parent
52a0bf62f5
commit
108a39c876
5 changed files with 149 additions and 73 deletions
|
|
@ -11,11 +11,9 @@ defmodule Pleroma.Plugs.UserEnabledPlug do
|
|||
end
|
||||
|
||||
def call(%{assigns: %{user: %User{} = user}} = conn, _) do
|
||||
if User.auth_active?(user) do
|
||||
conn
|
||||
else
|
||||
conn
|
||||
|> assign(:user, nil)
|
||||
case User.account_status(user) do
|
||||
:active -> conn
|
||||
_ -> assign(conn, :user, nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue