hook_profile_alter

developer/hooks/core.php, line 666

Versions
5
hook_profile_alter(&$account, &$fields)
6 – 7
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

Code

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

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.