You are here

function hook_og_membership_delete in Organic groups 7

Same name and namespace in other branches
  1. 7.2 og.api.php \hook_og_membership_delete()

Responds to OG membership deletion.

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

Parameters

OgMembership $og_membership: The OG membership that is being deleted.

See also

hook_entity_delete()

1 function implements hook_og_membership_delete()

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

og_og_membership_delete in ./og.module
Implements hook_og_membership_delete().

File

./og.api.php, line 492
Hooks provided by the Organic groups module.

Code

function hook_og_membership_delete(OgMembership $og_membership) {
  db_delete('mytable')
    ->condition('pid', entity_id('og_membership', $og_membership))
    ->execute();
}