Pleroma/lib/mix/tasks/deactivate_user.ex

14 lines
260 B
Elixir
Raw Normal View History

defmodule Mix.Tasks.DeactivateUser do
use Mix.Task
alias Pleroma.User
2018-10-30 00:08:56 +01:00
@shortdoc "Deactivate a user"
def run([nickname]) do
Mix.Task.run("app.start")
with user <- User.get_by_nickname(nickname) do
User.deactivate(user)
end
end
end