You are here

function purge_users_batch_completed in Auto Purge Users 7.2

Same name and namespace in other branches
  1. 8.3 purge_users.module \purge_users_batch_completed()
  2. 8 purge_users.module \purge_users_batch_completed()
  3. 8.2 purge_users.module \purge_users_batch_completed()
  4. 7 purge_users.module \purge_users_batch_completed()

The batch finish handler.

1 string reference to 'purge_users_batch_completed'
purge_users_multiple_cancel_confirm_submit in ./purge_users.module
Submit handler for mass-account cancellation confirmation form.

File

./purge_users.module, line 423
Purge users module file.

Code

function purge_users_batch_completed($success, $results, $operations) {
  if ($success) {
    $purged = isset($results['purged']) ? $results['purged'] : 0;
    $message = t('@count Users has been purged.', array(
      '@count' => $purged,
    ));
    drupal_set_message($message);
  }
  else {
    $error_operation = reset($operations);
    $message = t('An error occurred while processing %error_operation with arguments: @arguments', array(
      '%error_operation' => $error_operation[0],
      '@arguments' => print_r($error_operation[1], TRUE),
    ));
    drupal_set_message($message, 'error');
  }
}