You are here

function hook_og_membership_update in Organic groups 7

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

Responds to a OG membership being updated.

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

Parameters

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

See also

hook_entity_update()

1 function implements hook_og_membership_update()

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_update in ./og.module
Implements hook_og_membership_update().

File

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

Code

function hook_og_membership_update(OgMembership $og_membership) {
  db_update('mytable')
    ->fields(array(
    'extra' => print_r($og_membership, TRUE),
  ))
    ->condition('id', entity_id('og_membership', $og_membership))
    ->execute();
}