Same name and namespace in other branches
  1. 6.x developer/hooks/core.php \hook_profile_alter()

Perform alterations profile items before they are rendered. You may omit/add/re-sort/re-categorize, etc.

Parameters

$account: A user object specifying whose profile is being rendered

$fields: An array of $field objects, with unique module specified keys. Use this $key to find the item you care about.

Return value

None.

Related topics

File

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

Code

function hook_profile_alter(&$account, &$fields) {
  foreach ($fields as $key => $field) {

    // do something
  }
}