You are here

function email_registration_form_user_login_alter in Email Registration 7

Same name and namespace in other branches
  1. 6 email_registration.module \email_registration_form_user_login_alter()

Implements hook_form_FORM_ID_alter().

File

./email_registration.module, line 147
Allows users to register with an e-mail address as their username.

Code

function email_registration_form_user_login_alter(&$form, &$form_state) {
  $form['name']['#title'] = variable_get('email_registration_login_with_username', TRUE) ? t('E-mail or username') : t('E-mail');
  $form['name']['#description'] = variable_get('email_registration_login_with_username', TRUE) ? t('Enter your e-mail address or username.') : t('Enter your e-mail address.');
  $form['name']['#element_validate'][] = 'email_registration_user_login_validate';
  $form['pass']['#description'] = t('Enter the password that accompanies your e-mail.');
  email_registration_email_field($form['name']);
}