2 * Implements hook_user_view_alter().
4 function {{ machine_name }}_user_view_alter(&$build) {
5 // Check for the existence of a field added by another module.
6 if (isset($build['an_additional_field'])) {
8 $build['an_additional_field']['#weight'] = -10;
11 // Add a #post_render callback to act on the rendered HTML of the user.
12 $build['#post_render'][] = 'my_module_user_post_render';