You are here

function mass_pwreset_multiple_reset in Mass Password Reset 8

Same name and namespace in other branches
  1. 7 mass_pwreset.module \mass_pwreset_multiple_reset()
  2. 2.x mass_pwreset.module \mass_pwreset_multiple_reset()

Establish batch operation for resetting passwords.

Parameters

array $data: The array of data needed for this batch.

1 call to mass_pwreset_multiple_reset()
MassPasswordResetConfirmForm::submitForm in src/Form/MassPasswordResetConfirmForm.php
Form submission handler.

File

./mass_pwreset.module, line 16
Reset user passwords and optionally notify users.

Code

function mass_pwreset_multiple_reset(array $data) {
  $batch = [
    'operations' => [
      [
        'mass_pwreset_batch_process',
        [
          $data,
        ],
      ],
    ],
    'finished' => 'mass_pwreset_batch_finished',
    'title' => t('Multiple password reset'),
    'init_message' => t('Multiple password reset in progress.'),
    'progress_message' => t('Password reset batch in progress.'),
    'error_message' => t('There was an error in the password reset batch.'),
    'file' => drupal_get_path('module', 'mass_pwreset') . '/mass_pwreset.batch.inc',
  ];

  // Set batch via form submit handler.
  batch_set($batch);
}