Don't count deactivated users in statistics
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
c7ddbc1162
commit
01150af70e
@ -280,7 +280,7 @@ defmodule Mobilizon.Users do
|
|||||||
Counts users.
|
Counts users.
|
||||||
"""
|
"""
|
||||||
@spec count_users :: integer
|
@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 """
|
@doc """
|
||||||
Gets a settings for an user.
|
Gets a settings for an user.
|
||||||
|
Loading…
Reference in New Issue
Block a user