Commit a40ba3ba authored by link0ff's avatar link0ff
Browse files

Fix toggle_activated in mix task User

parent 2592b3c8
......@@ -142,8 +142,11 @@ def run(["toggle_activated", nickname]) do
Common.start_pleroma()
with %User{} = user <- User.get_by_nickname(nickname) do
User.deactivate(user, !user.info["deactivated"])
Mix.shell().info("Activation status of #{nickname}: #{user.info["deactivated"]}")
{:ok, user} = User.deactivate(user, !user.info.deactivated)
Mix.shell().info(
"Activation status of #{nickname}: #{if(user.info.deactivated, do: "de", else: "")}activated"
)
else
_ ->
Mix.shell().error("No user #{nickname}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment