function user_user_view

Implements hook_user_view().

File

drupal/core/modules/user/user.module, line 616
Enables the user registration and login system.

Code

function user_user_view(UserInterface $account, EntityDisplay $display) {
  if ($display
    ->getComponent('member_for')) {
    $account->content['member_for'] = array(
      '#type' => 'item',
      '#title' => t('Member for'),
      '#markup' => format_interval(REQUEST_TIME - $account->created),
    );
  }
}