function user_user_view
Same name in other branches
- 9 core/modules/user/user.module \user_user_view()
- 8.9.x core/modules/user/user.module \user_user_view()
- 10 core/modules/user/user.module \user_user_view()
Implements hook_user_view().
File
-
modules/
user/ user.module, line 1025
Code
function user_user_view($account) {
$account->content['user_picture'] = array(
'#markup' => theme('user_picture', array(
'account' => $account,
)),
'#weight' => -10,
);
if (!isset($account->content['summary'])) {
$account->content['summary'] = array();
}
$account->content['summary'] += array(
'#type' => 'user_profile_category',
'#attributes' => array(
'class' => array(
'user-member',
),
),
'#weight' => 5,
'#title' => t('History'),
);
$account->content['summary']['member_for'] = array(
'#type' => 'user_profile_item',
'#title' => t('Member for'),
'#markup' => format_interval(REQUEST_TIME - $account->created),
);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.