You are here

function om_user_pass in OM Tools 6.2

Same name and namespace in other branches
  1. 8.2 tools/user/user.inc \om_user_pass()
  2. 7.2 tools/user/user.inc \om_user_pass()

User Login Password Form

1 call to om_user_pass()
om_user_tools in tools/user/user.inc
User Tools Form

File

tools/user/user.inc, line 693
User Tools

Code

function om_user_pass($user_defaults = array()) {

  // User Password
  $out = array();

  // Reset New Request Password
  if ($user_defaults['user_pass_reset'] || !isset($user_defaults['user_pass_label'])) {
    $user_defaults['user_pass_title'] = 'New Password Request';
    $user_defaults['user_pass_label'] = 1;
    $user_defaults['user_pass_name_label_text'] = 'User Name or E-mail';
    $user_defaults['user_pass_name_description'] = '';
    $user_defaults['user_pass_size'] = 30;
    $user_defaults['user_pass_name_hover'] = 'Enter your user name or e-mail.';
    $user_defaults['user_pass_button'] = 'E-mail new password';
    $user_defaults['user_pass_reset'] = 0;
  }
  $out['user_pass_switch'] = array(
    '#type' => 'checkbox',
    '#title' => t('Change User New Password Request Page Form'),
    '#default_value' => $user_defaults['user_pass_switch'],
  );
  $out['user_pass_settings'] = array(
    '#type' => 'fieldset',
    '#attributes' => array(
      'id' => 'om-group-user-pass-settings',
    ),
    '#title' => t('User New Password Request Page Settings'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $out['user_pass_settings']['user_pass_title'] = array(
    '#type' => 'textfield',
    '#title' => t('User new password request page title'),
    '#default_value' => $user_defaults['user_pass_title'],
  );
  $out['user_pass_settings']['user_pass_label'] = array(
    '#type' => 'checkbox',
    '#title' => t('Put label inside the boxes.'),
    '#default_value' => $user_defaults['user_pass_label'],
  );
  $out['user_pass_settings']['user_pass_name_label_text'] = array(
    '#type' => 'textfield',
    '#title' => t('User Name or E-mail Label Text'),
    '#default_value' => $user_defaults['user_pass_name_label_text'],
  );
  $out['user_pass_settings']['user_pass_name_description'] = array(
    '#type' => 'textarea',
    '#title' => t('User Name or E-mail Description'),
    '#default_value' => $user_defaults['user_pass_name_description'],
  );
  $out['user_pass_settings']['user_pass_size'] = array(
    '#type' => 'textfield',
    '#title' => t('Text box size'),
    '#default_value' => $user_defaults['user_pass_size'],
  );
  $out['user_pass_settings']['user_pass_name_hover'] = array(
    '#type' => 'textfield',
    '#title' => t('User Name or E-mail Rollover Text'),
    '#default_value' => $user_defaults['user_pass_name_hover'],
  );
  $out['user_pass_settings']['user_pass_button'] = array(
    '#type' => 'textfield',
    '#title' => t('Button Text'),
    '#default_value' => $user_defaults['user_pass_button'],
  );
  $out['user_pass_reset'] = array(
    '#type' => 'checkbox',
    '#title' => t('Reset to default values.'),
    '#default_value' => $user_defaults['user_pass_reset'],
  );
  return $out;
}