aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks/pleroma/user.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-12-06 00:26:31 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-12-06 00:26:31 +0300
commit13926537b644c3a4f1904c2fcd5d25fe0f284663 (patch)
tree713182a80672ab37ad9284ad82b399107f050208 /lib/mix/tasks/pleroma/user.ex
parentaf42c00cfffb2cd8e93857cd1cf2901113c45bd2 (diff)
parent228bf4d214abe3bb62c52128d3bc145e396b174d (diff)
downloadpleroma-13926537b644c3a4f1904c2fcd5d25fe0f284663.tar.gz
Merge remote-tracking branch 'remotes/origin/develop' into 1427-oauth-admin-scopes
Diffstat (limited to 'lib/mix/tasks/pleroma/user.ex')
-rw-r--r--lib/mix/tasks/pleroma/user.ex18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/mix/tasks/pleroma/user.ex b/lib/mix/tasks/pleroma/user.ex
index 8c4739221..eff5191f5 100644
--- a/lib/mix/tasks/pleroma/user.ex
+++ b/lib/mix/tasks/pleroma/user.ex
@@ -362,6 +362,24 @@ defmodule Mix.Tasks.Pleroma.User do
end
end
+ def run(["list"]) do
+ start_pleroma()
+
+ Pleroma.User.Query.build(%{local: true})
+ |> Pleroma.RepoStreamer.chunk_stream(500)
+ |> Stream.each(fn users ->
+ users
+ |> Enum.each(fn user ->
+ shell_info(
+ "#{user.nickname} moderator: #{user.info.is_moderator}, admin: #{user.info.is_admin}, locked: #{
+ user.info.locked
+ }, deactivated: #{user.info.deactivated}"
+ )
+ end)
+ end)
+ |> Stream.run()
+ end
+
defp set_moderator(user, value) do
{:ok, user} =
user