hook_profile_alter

5 core.php hook_profile_alter(&$account, &$fields)
6 core.php hook_profile_alter(&$account)

Alter profile items before they are rendered.

You may omit/add/re-sort/re-categorize, etc.

Parameters

$account: A user object whose profile is being rendered. Profile items are stored in $account->content.

Related topics

1 invocation of hook_profile_alter()

File

developer/hooks/core.php, line 1064
These are the hooks that are invoked by the Drupal core.

Code

function hook_profile_alter(&$account) {
  foreach ($account->content as $key => $field) {
    // do something
  }
}

Comments

Drupal 7 Alternative

Is there a Drupal 7 alternative to this hook?

This would a combination of

This would a combination of hook_user_view and hook_user_view_alter.

Login or register to post comments