hook_profile_alter

Definition

hook_profile_alter(&$account, &$fields)
contributions/docs/developer/hooks/core.php, line 666

Description

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

Namesort iconDescription
HooksAllow modules to interact with the Drupal core.

Code

function hook_profile_alter(&$account, &$fields) {
  foreach ($fields AS $key => $field) {
    // do something
  }
}