function user_user_view in Drupal 7
Same name and namespace in other branches
- 8 core/modules/user/user.module \user_user_view()
- 9 core/modules/user/user.module \user_user_view()
Implements hook_user_view().
File
- modules/
user/ user.module, line 1016 - Enables the user registration and login system.
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),
);
}