1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2025-01-02 16:45:03 +01:00
pleroma/lib/mix/tasks/rm_user.ex
2018-04-12 14:30:53 -04:00

15 lines
290 B
Elixir

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