You are here

function og_membership_delete_multiple in Organic groups 7.2

Same name and namespace in other branches
  1. 7 og.module \og_membership_delete_multiple()

Delete multiple existing OG memberships.

We can't use entity_delete_multiple(), as we need to make sure the field cache is invalidated.

Parameters

$ids: Array with OG membership entity IDs to be deleted.

7 calls to og_membership_delete_multiple()
MigrateDestinationOGMembership::bulkRollback in includes/migrate/plugins/destinations/og_membership.inc
Delete a batch of memberships at once.
OgBehaviorHandler::delete in plugins/entityreference/behavior/OgBehaviorHandler.class.php
Implements EntityReference_BehaviorHandler_Abstract::Delete()
OgBehaviorHandler::OgMembershipCrud in plugins/entityreference/behavior/OgBehaviorHandler.class.php
Create, update or delete OG membership based on field values.
OgUiPrivateGroupStatus::testMemberShipRequestStatus in og_ui/og_ui.test
The variable "og_ui_deny_subscribe_without_approval" responsible for determine that when the user ask to join to a private group their membership status will be pending. By default his value is true. The test has two parts:
og_membership_delete in ./og.module
Delete an existing OG membership.

... See full list

File

./og.module, line 1621
Enable users to create and manage groups with roles and permissions.

Code

function og_membership_delete_multiple($ids = array()) {
  entity_delete_multiple('og_membership', $ids);
  og_invalidate_cache();
}