aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/statistics.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-26 08:34:39 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-26 08:34:39 +0000
commit4ad69c6ec8950a480e2a3c6561dd07d7a277b336 (patch)
tree41eaabce409a84c8f6d5fc85aca03bc0c973f59b /engine/lib/statistics.php
parent7b62937942d4506c2d2a23c4a7211adbeccd83d1 (diff)
downloadelgg-4ad69c6ec8950a480e2a3c6561dd07d7a277b336.tar.gz
elgg-4ad69c6ec8950a480e2a3c6561dd07d7a277b336.tar.bz2
Minor tweak to basic stats to clarify number of users in the system.
git-svn-id: https://code.elgg.org/elgg/trunk@2041 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/statistics.php')
-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;