mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-02 14:44:13 +00:00
15 lines
303 B
Elixir
15 lines
303 B
Elixir
defmodule Mix.Tasks.RmUser do
|
|
use Mix.Task
|
|
import Mix.Ecto
|
|
alias Pleroma.{User, Repo}
|
|
|
|
@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
|