Add an extra field to a user display
/**
* Implements hook_field_extra_fields().
*/
function MYMODULE_field_extra_fields() {
$extra['user']['user'] = array (
'display' => array(
'extra_field' => array(
'label' => t('User extra field'),
'description' => t('Adds an extra field to a user view.'),
'weight' => -99,
)
)
);
return $extra;
}
/**
* Implements hook_user_view().
*/
function MYMODULE_user_view($account, $view_mode, $langcode) {
$account->content['extra_user_transfer_link'] = array('#markup' => 'Data');
}