pleroma/lib/mix/tasks/reactivate_user.ex

14 lines
267 B
Elixir
Raw Normal View History

2018-10-29 19:08:56 -04:00
defmodule Mix.Tasks.ReactivateUser do
use Mix.Task
alias Pleroma.User
@shortdoc "Reactivate a user"
def run([nickname]) do
Mix.Task.run("app.start")
with user <- User.get_by_nickname(nickname) do
User.deactivate(user, false)
end
end
end