diff options
| -rw-r--r-- | engine/lib/statistics.php | 10 | ||||
| -rw-r--r-- | languages/en.php | 5 | ||||
| -rw-r--r-- | views/default/admin/statistics_opt/basic.php | 3 | 
3 files changed, 14 insertions, 4 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; diff --git a/languages/en.php b/languages/en.php index cdfb22c29..416b6f521 100644 --- a/languages/en.php +++ b/languages/en.php @@ -541,7 +541,10 @@ To remove a widget drag it back to the <b>Widget gallery</b>.",  			'option:yes' => "Yes",
  			'option:no' => "No",
 -			'unknown' => 'Unknown',
 +			'unknown' => 'Unknown', +	 +			'active' => 'Active', +			'total' => 'Total',
  			'learnmore' => "Click here to learn more.",
 diff --git a/views/default/admin/statistics_opt/basic.php b/views/default/admin/statistics_opt/basic.php index 07bacd483..1ea3578b5 100644 --- a/views/default/admin/statistics_opt/basic.php +++ b/views/default/admin/statistics_opt/basic.php @@ -12,6 +12,7 @@  	// Work out number of users  	$users_stats = get_number_users(); +	$total_users = get_number_users(true);  	global $CONFIG; @@ -27,7 +28,7 @@          </tr>          <tr class="even">              <td class="column_one"><b><?php echo elgg_echo('admin:statistics:label:numusers'); ?> :</b></td> -            <td><?php echo $users_stats; ?></td> +            <td><?php echo $users_stats; ?> <?php echo elgg_echo('active'); ?> / <?php echo $total_users; ?> <?php echo elgg_echo('total') ?></td>          </tr>      </table>   | 
