Don't count deactivated users in statistics

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-10-13 14:39:05 +02:00
parent 1a3a3602d1
commit 8035fb743d
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -280,7 +280,7 @@ defmodule Mobilizon.Users do
Counts users.
"""
@spec count_users :: integer
def count_users, do: Repo.one(from(u in User, select: count(u.id)))
def count_users, do: Repo.one(from(u in User, select: count(u.id), where: u.disabled == false))
@doc """
Gets a settings for an user.