2018-05-13 16:33:43 -07:00
|
|
|
defmodule Mix.Tasks.DeactivateUser do
|
|
|
|
use Mix.Task
|
|
|
|
alias Pleroma.User
|
|
|
|
|
2018-10-29 16:08:56 -07:00
|
|
|
@shortdoc "Deactivate a user"
|
2018-05-13 16:33:43 -07:00
|
|
|
def run([nickname]) do
|
|
|
|
Mix.Task.run("app.start")
|
|
|
|
|
|
|
|
with user <- User.get_by_nickname(nickname) do
|
|
|
|
User.deactivate(user)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|