function hook_og_membership_presave

7.x-2.x og.api.php hook_og_membership_presave(OgMembership $og_membership)
7.x-1.x og.api.php hook_og_membership_presave(OgMembership $og_membership)

Acts on a OG membership being inserted or updated.

This hook is invoked before the OG membership is saved to the database.

Parameters

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

See also

hook_entity_presave()

File

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

Code

function hook_og_membership_presave(OgMembership $og_membership) {
  $og_membership->name = 'foo';
}