You are here

function hook_profile2_update in Profile 2 7

Same name and namespace in other branches
  1. 7.2 profile2.api.php \hook_profile2_update()

Respond to a profile being updated.

This hook is invoked after the profile has been updated in the database.

Parameters

$profile: The $profile that is being updated.

See also

hook_entity_update()

File

./profile2.api.php, line 76
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_profile2_update($profile) {
  db_update('mytable')
    ->fields(array(
    'extra' => $profile->extra,
  ))
    ->condition('pid', $profile->pid)
    ->execute();
}