You are here

function email_registration_email_field in Email Registration 7

Converts element to email type field if Elements module is enabled and if configured to do so.

4 calls to email_registration_email_field()
email_registration_form_user_login_alter in ./email_registration.module
Implements hook_form_FORM_ID_alter().
email_registration_form_user_login_block_alter in ./email_registration.module
Implements hook_form_FORM_ID_alter().
email_registration_form_user_pass_alter in ./email_registration.module
Implements hook_form_FORM_ID_alter().
email_registration_form_user_register_form_alter in ./email_registration.module
Implements hook_form_FORM_ID_alter().
3 string references to 'email_registration_email_field'
email_registration_form_user_admin_settings_alter in ./email_registration.module
Implements hook_form_FORM_ID_alter().
email_registration_form_user_admin_settings_submit in ./email_registration.module
Submit function for user_admin_settings to save our variable.
email_registration_uninstall in ./email_registration.install
Implements hook_uninstall().

File

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

Code

function email_registration_email_field(&$element) {
  if (module_exists('elements') && variable_get('email_registration_email_field', FALSE)) {
    $element['#type'] = 'emailfield';
  }
}