function securesite_user_login in Secure Site 6.2
We use our own version of the log-in form for theming. We do not use the default validate and submit functions because we may allow anonymous users.
See also
2 string references to 'securesite_user_login'
- _securesite_dialog_page in ./
securesite.inc - Display fall-back HTML for HTTP authentication dialogs. Safari will not load this. Opera will not load this after log-out unless the page has been reloaded and the authentication dialog has been displayed twice.
- _securesite_mechanism in ./
securesite.module - Return the authentication method used by the client, or FALSE if the client did not send credentials.
File
- ./
securesite.inc, line 417 - Secure Site log-in functions.
Code
function securesite_user_login(&$form_state) {
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('User name'),
'#maxlength' => USERNAME_MAX_LENGTH,
'#size' => 15,
);
$form['pass'] = array(
'#type' => 'password',
'#title' => t('Password'),
'#maxlength' => 60,
'#size' => 15,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Log in'),
'#weight' => 2,
);
if (module_exists('openid')) {
global $base_path;
$style = '<style type="text/css" media="all">' . "\n" . '#securesite-user-login li.openid-link {' . "\n" . ' background:transparent url(' . $base_path . drupal_get_path('module', 'openid') . '/login-bg.png) no-repeat scroll 1px 0.35em;' . "\n" . '}' . "\n" . '</style>';
drupal_set_html_head($style);
}
$data =& $form;
$data['__drupal_alter_by_ref'] = array(
&$form_state,
);
drupal_alter('form', $data, 'user_login');
return $form;
}