You are here

protected function FeedsUserProcessor::entityDeleteMultiple in Feeds 7.2

Delete multiple user accounts.

Overrides FeedsProcessor::entityDeleteMultiple

File

plugins/FeedsUserProcessor.inc, line 209
Contains FeedsUserProcessor.

Class

FeedsUserProcessor
Feeds processor plugin. Create users from feed items.

Code

protected function entityDeleteMultiple($uids) {

  // Prevent user 1 from being deleted.
  if (in_array(1, $uids)) {
    $uids = array_diff($uids, array(
      1,
    ));

    // But do delete the associated feeds item.
    db_delete('feeds_item')
      ->condition('entity_type', $this
      ->entityType())
      ->condition('entity_id', 1)
      ->execute();
  }
  user_delete_multiple($uids);
}