You are here

function _systeminfo_admin_overview_drupal_users in System Information 7.3

Same name and namespace in other branches
  1. 6.3 systeminfo.admin.inc \_systeminfo_admin_overview_drupal_users()
1 call to _systeminfo_admin_overview_drupal_users()
systeminfo_admin_overview in ./systeminfo.admin.inc
Menu callback; displays the overview page.

File

./systeminfo.admin.inc, line 95
Admin page callbacks for the systeminfo module.

Code

function _systeminfo_admin_overview_drupal_users() {
  $rows = array();
  $rows[] = array(
    t('Total'),
    format_plural(db_query('SELECT COUNT(uid) FROM {users} WHERE uid <> 0')
      ->fetchField(), '1 account', '@count accounts'),
  );
  $rows[] = array(
    array(
      'data' => t('Active'),
      'class' => 'text1',
    ),
    format_plural(db_query('SELECT COUNT(uid) FROM {users} WHERE uid <> 0 AND status = 1')
      ->fetchField(), '1 account', '@count accounts'),
  );
  $rows[] = array(
    array(
      'data' => t('Blocked'),
      'class' => 'text1',
    ),
    format_plural(db_query('SELECT COUNT(uid) FROM {users} WHERE uid <> 0 AND status = 0')
      ->fetchField(), '1 account', '@count accounts'),
  );
  return theme('table', array(
    'header' => array(),
    'rows' => $rows,
    'attributes' => array(
      'class' => array(
        'systeminfo',
        'systeminfo-width50',
      ),
    ),
  ));
}