mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 18:17:55 +00:00
14 lines
267 B
Elixir
14 lines
267 B
Elixir
|
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
|