user_email_validation_test.module

Dummy module implementing hook_valid_email_address_alter.

File

modules/user/tests/user_email_validation_test.module

View source
<?php


/**
 * @file
 * Dummy module implementing hook_valid_email_address_alter.
 */


/**
 * Implements hook_valid_email_address_alter().
 */
function user_email_validation_test_valid_email_address_alter(&$valid, $mail) {
  $local = '.local';
  // Invalidate all e-mails ending with .local.
  if (substr_compare($mail, $local, -strlen($local)) === 0) {
    $valid = FALSE;
  }
}

Functions

Title Deprecated Summary
user_email_validation_test_valid_email_address_alter Implements hook_valid_email_address_alter().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.