aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/statistics.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/engine/lib/statistics.php b/engine/lib/statistics.php
index 89c6d9a09..c1faaa9c7 100644
--- a/engine/lib/statistics.php
+++ b/engine/lib/statistics.php
@@ -57,13 +57,19 @@
/**
* Return the number of users registered in the system.
*
+ * @param bool $show_deactivated
* @return int
*/
- function get_number_users()
+ function get_number_users($show_deactivated = false)
{
global $CONFIG;
- $result = get_data_row("SELECT count(*) as count from {$CONFIG->dbprefix}entities where type='user'");
+ $access = "";
+
+ if (!$show_deactivated)
+ $access = "and " . get_access_sql_suffix();
+
+ $result = get_data_row("SELECT count(*) as count from {$CONFIG->dbprefix}entities where type='user' $access");
if ($result)
return $result->count;