function om_user_register in OM Tools 8.2
Same name and namespace in other branches
- 6.2 tools/user/user.inc \om_user_register()
- 7.2 tools/user/user.inc \om_user_register()
User Register Form
1 call to om_user_register()
- om_user_tools in tools/
user/ user.inc - User Tools Form
File
- tools/
user/ user.inc, line 594 - User Tools
Code
function om_user_register($user_defaults = array()) {
// User register
$out = array();
// User Reset Registration
if (!isset($user_defaults['user_register_label']) || $user_defaults['user_register_reset'] == 1) {
$user_defaults['user_register_title'] = 'Register';
$user_defaults['user_register_label'] = 1;
$user_defaults['user_register_name_label_text'] = 'User Name';
$user_defaults['user_register_name_description'] = 'Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.';
$user_defaults['user_register_mail_label_text'] = 'E-mail Address';
$user_defaults['user_register_mail_description'] = 'A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.';
$user_defaults['user_register_size'] = 30;
$user_defaults['user_register_name_hover'] = 'Enter your user name.';
$user_defaults['user_register_mail_hover'] = 'Enter your e-mail address.';
$user_defaults['user_register_button'] = 'Create new account';
$user_defaults['user_register_reset'] = 0;
}
$out['user_register_switch'] = array(
'#type' => 'checkbox',
'#title' => t('Change User Register Page Form'),
'#default_value' => isset($user_defaults['user_register_switch']) ? $user_defaults['user_register_switch'] : 0,
);
$out['user_register_settings'] = array(
'#type' => 'fieldset',
'#attributes' => array(
'id' => 'om-group-user-register-settings',
),
'#title' => t('User register Page Settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$out['user_register_settings']['user_register_title'] = array(
'#type' => 'textfield',
'#title' => t('User register page title'),
'#default_value' => isset($user_defaults['user_register_title']) ? $user_defaults['user_register_title'] : '',
);
$out['user_register_settings']['user_register_label'] = array(
'#type' => 'checkbox',
'#title' => t('Put label inside the boxes.'),
'#default_value' => isset($user_defaults['user_register_label']) ? $user_defaults['user_register_label'] : 1,
);
$out['user_register_settings']['user_register_name_label_text'] = array(
'#type' => 'textfield',
'#title' => t('User Name Label Text'),
'#default_value' => isset($user_defaults['user_register_name_label_text']) ? $user_defaults['user_register_name_label_text'] : '',
);
$out['user_register_settings']['user_register_name_description'] = array(
'#type' => 'textarea',
'#title' => t('User Name Description'),
'#default_value' => isset($user_defaults['user_register_name_description']) ? $user_defaults['user_register_name_description'] : '',
);
$out['user_register_settings']['user_register_mail_label_text'] = array(
'#type' => 'textfield',
'#title' => t('User E-mail Label Text'),
'#default_value' => isset($user_defaults['user_register_mail_label_text']) ? $user_defaults['user_register_mail_label_text'] : '',
);
$out['user_register_settings']['user_register_mail_description'] = array(
'#type' => 'textarea',
'#title' => t('User E-mail Description'),
'#default_value' => isset($user_defaults['user_register_mail_description']) ? $user_defaults['user_register_mail_description'] : '',
);
$out['user_register_settings']['user_register_size'] = array(
'#type' => 'textfield',
'#title' => t('Text box size'),
'#default_value' => isset($user_defaults['user_register_size']) ? $user_defaults['user_register_size'] : 30,
);
$out['user_register_settings']['user_register_name_hover'] = array(
'#type' => 'textfield',
'#title' => t('User Name Rollover Text'),
'#default_value' => isset($user_defaults['user_register_name_hover']) ? $user_defaults['user_register_name_hover'] : '',
);
$out['user_register_settings']['user_register_mail_hover'] = array(
'#type' => 'textfield',
'#title' => t('User E-mail Rollover Text'),
'#default_value' => isset($user_defaults['user_register_mail_hover']) ? $user_defaults['user_register_mail_hover'] : '',
);
$out['user_register_settings']['user_register_button'] = array(
'#type' => 'textfield',
'#title' => t('Button Text'),
'#default_value' => isset($user_defaults['user_register_button']) ? $user_defaults['user_register_button'] : '',
);
$out['user_register_reset'] = array(
'#type' => 'checkbox',
'#title' => t('Reset to default values.'),
'#default_value' => isset($user_defaults['user_register_reset']) ? $user_defaults['user_register_reset'] : 0,
);
return $out;
}