You are here

function mass_pwreset_form in Mass Password Reset 7

Form constructor for the mass password reset form.

See also

mass_pwreset_submit()

1 string reference to 'mass_pwreset_form'
mass_pwreset_menu in ./mass_pwreset.module
Implements hook_menu().

File

./mass_pwreset.admin.inc, line 14
Admin page callbacks for the mass_pwreset module.

Code

function mass_pwreset_form($form, $form_state) {
  $form['options'] = array(
    '#type' => 'fieldset',
    '#title' => t('Options'),
  );
  $form['options']['choose_roles'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Choose for what role'),
    '#options' => user_roles(TRUE),
    '#required' => TRUE,
  );
  $form['options']['notify_users'] = array(
    '#type' => 'checkbox',
    '#title' => t('Notify users of password reset via email'),
    '#description' => t("Notify users of password reset with Drupal's password recovery email."),
    '#default_value' => 0,
  );
  $form['options']['include_admin_user'] = array(
    '#type' => 'checkbox',
    '#title' => t('Include admin user (uid1)'),
    '#description' => t('Include the administrative superuser id 1 account in the list of passwords being reset.'),
    '#default_value' => 0,
  );
  $form['reset_passwords'] = array(
    '#type' => 'submit',
    '#value' => t('Reset passwords'),
    '#submit' => array(
      'mass_pwreset_submit',
    ),
  );
  return $form;
}