function lockr_login_form in Lockr 7
Same name and namespace in other branches
- 7.3 lockr.login.inc \lockr_login_form()
- 7.2 lockr.login.inc \lockr_login_form()
Login form that will turn around and use the credentials to register the site with Lockr.
1 string reference to 'lockr_login_form'
- lockr_menu in ./
lockr.module - Implements hook_menu().
File
- ./
lockr.login.inc, line 15 - Form callbacks for the Lockr login form.
Code
function lockr_login_form($form, &$form_state) {
$default_email = isset($_GET['email']) ? $_GET['email'] : NULL;
$form['email'] = array(
'#type' => 'textfield',
'#title' => t('Email'),
'#required' => TRUE,
'#default_value' => $default_email,
'#description' => t('Enter your @s email.', array(
'@s' => 'Lockr',
)),
);
$form['pass'] = array(
'#type' => 'password',
'#title' => t('Password'),
'#required' => TRUE,
'#description' => t('Enter the password that accompanies your email.'),
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Log in'),
);
$form_state['storage']['next'] = isset($_GET['next']) ? $_GET['next'] : '/admin/config/system/keys/add';
return $form;
}