1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-23 15:55:04 +01:00

add mix task for deactivating a user by nickname

This commit is contained in:
William Pitcock 2018-05-13 23:33:43 +00:00
parent 9390492138
commit a6a6915aaf

View File

@ -0,0 +1,13 @@
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