You are here

function email_registration_form_user_login_block_alter in Email Registration 7

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

Implements hook_form_FORM_ID_alter().

File

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

Code

function email_registration_form_user_login_block_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']['#element_validate'][] = 'email_registration_user_login_validate';
  email_registration_email_field($form['name']);
}