1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-29 03:05:19 +01:00
pleroma/lib/mix/tasks/rm_user.ex
2018-05-04 21:25:31 +00:00

14 lines
277 B
Elixir

defmodule Mix.Tasks.RmUser do
use Mix.Task
alias Pleroma.User
@shortdoc "Permanently delete a user"
def run([nickname]) do
Mix.Task.run("app.start")
with %User{local: true} = user <- User.get_by_nickname(nickname) do
User.delete(user)
end
end
end