| 5 core.php | hook_profile_alter(&$account, & |
| 6 core.php | hook_profile_alter(&$account) |
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
<?php
function hook_profile_alter(&$account, &$fields) {
foreach ($fields as $key => $field) {
// do something
}
}
?>Login or register to post comments