function om_user_login in OM Tools 7.2
Same name and namespace in other branches
- 8.2 tools/user/user.inc \om_user_login()
- 6.2 tools/user/user.inc \om_user_login()
User Login Form
1 call to om_user_login()
- om_user_tools in tools/
user/ user.inc - User Tools Form
File
- tools/
user/ user.inc, line 433 - OM Tools - User Tools for Drupal
Code
function om_user_login($user_defaults = array()) {
// User Login
$out = array();
// Reset User Login Page
if (!isset($user_defaults['user_login_label']) || $user_defaults['user_login_reset'] == 1) {
$user_defaults['user_login_title'] = 'Log In';
$user_defaults['user_login_label'] = 1;
$user_defaults['user_login_name_label_text'] = 'User Name';
$user_defaults['user_login_name_description'] = 'Enter your username.';
$user_defaults['user_login_pass_label_text'] = 'Password';
$user_defaults['user_login_pass_description'] = 'Enter the password that accompanies your username.';
$user_defaults['user_login_size'] = 30;
$user_defaults['user_login_name_hover'] = 'Enter your user name.';
$user_defaults['user_login_pass_hover'] = 'Enter your password.';
$user_defaults['user_login_button'] = 'Login';
$user_defaults['user_login_reset'] = 0;
}
$out['user_login_switch'] = array(
'#type' => 'checkbox',
'#title' => t('Change User Login Page Form'),
'#default_value' => isset($user_defaults['user_login_switch']) ? $user_defaults['user_login_switch'] : 0,
);
$out['user_login_settings'] = array(
'#type' => 'fieldset',
'#attributes' => array(
'id' => 'om-group-user-login-settings',
),
'#title' => t('User Login Page Settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$out['user_login_settings']['user_login_title'] = array(
'#type' => 'textfield',
'#title' => t('User log in page title'),
'#default_value' => isset($user_defaults['user_login_title']) ? $user_defaults['user_login_title'] : '',
);
$out['user_login_settings']['user_login_label'] = array(
'#type' => 'checkbox',
'#title' => t('Put label inside the boxes.'),
'#default_value' => isset($user_defaults['user_login_label']) ? $user_defaults['user_login_label'] : 1,
);
$out['user_login_settings']['user_login_name_label_text'] = array(
'#type' => 'textfield',
'#title' => t('User Name Label Text'),
'#default_value' => isset($user_defaults['user_login_name_label_text']) ? $user_defaults['user_login_name_label_text'] : '',
);
$out['user_login_settings']['user_login_name_description'] = array(
'#type' => 'textfield',
'#title' => t('User Name Description'),
'#default_value' => isset($user_defaults['user_login_name_description']) ? $user_defaults['user_login_name_description'] : '',
);
$out['user_login_settings']['user_login_pass_label_text'] = array(
'#type' => 'textfield',
'#title' => t('User Password Label Text'),
'#default_value' => isset($user_defaults['user_login_pass_label_text']) ? $user_defaults['user_login_pass_label_text'] : '',
);
$out['user_login_settings']['user_login_pass_description'] = array(
'#type' => 'textfield',
'#title' => t('User Password Description'),
'#default_value' => isset($user_defaults['user_login_pass_description']) ? $user_defaults['user_login_pass_description'] : '',
);
$out['user_login_settings']['user_login_size'] = array(
'#type' => 'textfield',
'#title' => t('Text box size'),
'#default_value' => isset($user_defaults['user_login_size']) ? $user_defaults['user_login_size'] : 30,
);
$out['user_login_settings']['user_login_name_hover'] = array(
'#type' => 'textfield',
'#title' => t('User Name Rollover Text'),
'#default_value' => isset($user_defaults['user_login_name_hover']) ? $user_defaults['user_login_name_hover'] : '',
);
$out['user_login_settings']['user_login_pass_hover'] = array(
'#type' => 'textfield',
'#title' => t('User Password Rollover Text'),
'#default_value' => isset($user_defaults['user_login_pass_hover']) ? $user_defaults['user_login_pass_hover'] : '',
);
$out['user_login_settings']['user_login_button'] = array(
'#type' => 'textfield',
'#title' => t('Button Text'),
'#default_value' => isset($user_defaults['user_login_button']) ? $user_defaults['user_login_button'] : '',
);
$out['user_login_reset'] = array(
'#type' => 'checkbox',
'#title' => t('Reset to default values.'),
'#default_value' => isset($user_defaults['user_login_reset']) ? $user_defaults['user_login_reset'] : 0,
);
return $out;
}