Reports
This commit is contained in:
parent
77fb926afa
commit
bff9eb5ef7
18 changed files with 347 additions and 5 deletions
|
|
@ -273,7 +273,7 @@ defmodule Pleroma.User do
|
|||
Pleroma.Config.get([:instance, :account_activation_required]) do
|
||||
user
|
||||
|> Pleroma.UserEmail.account_confirmation_email()
|
||||
|> Pleroma.Mailer.deliver()
|
||||
|> Pleroma.Mailer.deliver_async()
|
||||
else
|
||||
{:ok, :noop}
|
||||
end
|
||||
|
|
@ -1284,4 +1284,13 @@ defmodule Pleroma.User do
|
|||
inserted_at: NaiveDateTime.utc_now()
|
||||
}
|
||||
end
|
||||
|
||||
def all_superusers do
|
||||
from(
|
||||
u in User,
|
||||
where: u.local == true,
|
||||
where: fragment("?->'is_admin' @> 'true' OR ?->'is_moderator' @> 'true'", u.info, u.info)
|
||||
)
|
||||
|> Repo.all()
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue