From 8035fb743d67596d4c22421c058609d8dd2064fd Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 13 Oct 2020 14:39:05 +0200 Subject: [PATCH] Don't count deactivated users in statistics Signed-off-by: Thomas Citharel --- lib/mobilizon/users/users.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mobilizon/users/users.ex b/lib/mobilizon/users/users.ex index 21bc20c9b..d4c02aa93 100644 --- a/lib/mobilizon/users/users.ex +++ b/lib/mobilizon/users/users.ex @@ -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.