You are here

function admin_menu_links_users in Administration menu 7.3

Same name and namespace in other branches
  1. 8.3 admin_menu.inc \admin_menu_links_users()

Builds user counter.

See also

theme_admin_menu_links()

1 call to admin_menu_links_users()
admin_menu_output in ./admin_menu.module
Build the administration menu output.

File

./admin_menu.inc, line 570
Menu builder functions for Administration menu.

Code

function admin_menu_links_users() {
  $links = array(
    '#theme' => 'admin_menu_links',
    '#wrapper_attributes' => array(
      'id' => 'admin-menu-users',
    ),
    '#weight' => 150,
  );

  // Add link to show current authenticated/anonymous users.
  $links['user-counter'] = array(
    '#title' => admin_menu_get_user_count(),
    '#description' => t('Current anonymous / authenticated users'),
    '#weight' => -90,
    '#attributes' => array(
      'class' => array(
        'admin-menu-action',
        'admin-menu-users',
      ),
    ),
    '#href' => user_access('administer users') ? 'admin/people' : 'user',
  );
  return $links;
}