mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-09-09 05:08:25 +00:00
14 lines
280 B
Elixir
14 lines
280 B
Elixir
|
defmodule Mix.Tasks.DeactivateUser do
|
||
|
use Mix.Task
|
||
|
alias Pleroma.User
|
||
|
|
||
|
@shortdoc "Toggle deactivation status for 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
|