You are here

function hook_profile2_delete in Profile 2 7.2

Same name and namespace in other branches
  1. 7 profile2.api.php \hook_profile2_delete()

Respond to profile deletion.

This hook is invoked after the profile has been removed from the database.

Parameters

$profile: The profile that is being deleted.

See also

hook_entity_delete()

1 function implements hook_profile2_delete()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

profile2_profile2_delete in ./profile2.module
Implements hook_profile2_delete().

File

./profile2.api.php, line 93
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_delete($profile) {
  db_delete('mytable')
    ->condition('pid', $profile->pid)
    ->execute();
}