function om_user_pass in OM Tools 7.2
Same name and namespace in other branches
- 8.2 tools/user/user.inc \om_user_pass()
- 6.2 tools/user/user.inc \om_user_pass()
User 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 627 - OM Tools - User Tools for Drupal
Code
function om_user_pass($user_defaults = array()) {
// User password
$out = array();
// Reset New Request Password
if (!isset($user_defaults['user_pass_label']) || $user_defaults['user_pass_reset'] == 1) {
$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;
}
// User Request for New Password Page
$out['user_pass_switch'] = array(
'#type' => 'checkbox',
'#title' => t('Change User New Password Request Page Form'),
'#default_value' => isset($user_defaults['user_pass_switch']) ? $user_defaults['user_pass_switch'] : 0,
);
$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' => isset($user_defaults['user_pass_title']) ? $user_defaults['user_pass_title'] : '',
);
$out['user_pass_settings']['user_pass_label'] = array(
'#type' => 'checkbox',
'#title' => t('Put label inside the boxes.'),
'#default_value' => isset($user_defaults['user_pass_label']) ? $user_defaults['user_pass_label'] : 1,
);
$out['user_pass_settings']['user_pass_name_label_text'] = array(
'#type' => 'textfield',
'#title' => t('User Name or E-mail Label Text'),
'#default_value' => isset($user_defaults['user_pass_name_label_text']) ? $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' => isset($user_defaults['user_pass_name_description']) ? $user_defaults['user_pass_name_description'] : '',
);
$out['user_pass_settings']['user_pass_size'] = array(
'#type' => 'textfield',
'#title' => t('Text box size'),
'#default_value' => isset($user_defaults['user_pass_size']) ? $user_defaults['user_pass_size'] : 30,
);
$out['user_pass_settings']['user_pass_name_hover'] = array(
'#type' => 'textfield',
'#title' => t('User Name or E-mail Rollover Text'),
'#default_value' => isset($user_defaults['user_pass_name_hover']) ? $user_defaults['user_pass_name_hover'] : '',
);
$out['user_pass_settings']['user_pass_button'] = array(
'#type' => 'textfield',
'#title' => t('Button Text'),
'#default_value' => isset($user_defaults['user_pass_button']) ? $user_defaults['user_pass_button'] : '',
);
$out['user_pass_reset'] = array(
'#type' => 'checkbox',
'#title' => t('Reset to default values.'),
'#default_value' => isset($user_defaults['user_pass_reset']) ? $user_defaults['user_pass_reset'] : 0,
);
return $out;
}