You are here

function mass_pwreset_batch_finished in Mass Password Reset 7

Same name and namespace in other branches
  1. 8 mass_pwreset.batch.inc \mass_pwreset_batch_finished()
  2. 2.x mass_pwreset.batch.inc \mass_pwreset_batch_finished()

Batch finish callback

1 string reference to 'mass_pwreset_batch_finished'
mass_pwreset_multiple_reset in ./mass_pwreset.module
Batch function: Multiple reset

File

./mass_pwreset.batch.inc, line 38

Code

function mass_pwreset_batch_finished($success, $results, $operations) {
  if ($success) {
    drupal_set_message(t('!count processed.', array(
      '!count' => count($results),
    )));
  }
  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');
  }
}