1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2025-01-13 02:36:22 +01:00
pleroma/lib/mix/tasks/deactivate_user.ex
2018-11-10 13:09:37 +01:00

20 lines
376 B
Elixir

defmodule Mix.Tasks.DeactivateUser do
use Mix.Task
alias Pleroma.User
@moduledoc """
Deactivates a user (local or remote)
Usage: ``mix deactivate_user <nickname>``
Example: ``mix deactivate_user lain``
"""
def run([nickname]) do
Mix.Task.run("app.start")
with user <- User.get_by_nickname(nickname) do
User.deactivate(user)
end
end
end