Drupal Email registration and Email as username

/*
* Enable email_registration.module
* Implements hook_email_registration_name()
*/
function MY_MODULE_email_registration_name($edit, $account) {
  return $account->mail;
}
Help Share this Article