1 admin_bar.inc admin_bar_links_account()

Builds the account links.

See also

theme_admin_bar_links()

File

core/modules/admin_bar/admin_bar.inc, line 613
Menu builder functions for Administration bar.

Code

function admin_bar_links_account() {
  $links['account'] = array(
    '#title' => user_format_name($GLOBALS['user']),
    '#weight' => 50,
    '#attributes' => array('class' => array('admin-bar-account')),
    '#href' => 'user/' . $GLOBALS['user']->uid,
    '#options' => array(
      'icon' => 'user-circle-fill',
    ),
  );
  $links['logout'] = array(
    '#title' => t('Log out'),
    '#weight' => 51,
    '#attributes' => array('class' => array('admin-bar-logout')),
    '#href' => 'user/logout',
    '#options' => array(
      'icon' => 'sign-out-fill',
    ),
  );
  return $links;
}