hook_profile_alter

Definition

hook_profile_alter(&$fields, $account)
developer/hooks/core.php, line 838

Description

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

Parameters

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

$account A user object specifying whose profile is being rendered

Return value

None.

Related topics

Namesort iconDescription
HooksAllow modules to interact with the Drupal core.

Code

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

Drupal is a registered trademark of Dries Buytaert.