You are here

public function MigrateDestinationUserRelationships::rollback in Migrate Extras 7.2

Same name and namespace in other branches
  1. 6.2 user_relationships.inc \MigrateDestinationUserRelationships::rollback()

Delete a membership.

Parameters

$id: ID to be deleted.

File

./user_relationships.inc, line 52
Import User Relationships.

Class

MigrateDestinationUserRelationships
Destination class implementing migration into user_relationships table.

Code

public function rollback(array $id) {
  migrate_instrument_start(__METHOD__);
  if ($relationship = user_relationships_load(array(
    'rid' => $id['destid1'],
  ))) {
    $account = new stdClass();
    user_relationships_delete_relationship(current($relationship), $account);
  }
  migrate_instrument_stop(__METHOD__);
}