Question: I'd like to make email address optional during magento registration. I'm going to be adding an additional username attribute that users will be able to log in with (I've already got that part working). What are the steps to do this, or is it even possible? I found an old extension that does what I want I think, but it is out dated. <http://www.magentocommerce.com/magento-connect/email-not-required.html>

Thanks for any help.

Answer: 
You could do something similar to what the extension does.

> 
> "This extension will allow you to add customers without a valid email address. If no email address is present it will insert automatically an email address [customernumber]@[default customer domain]...."
> 
> 
> 

You could create a gmail (or if you use google app for you company email) or a catch all email

Email Format

> 
> noemail+[timestamp]-[ipaddress to long]@gmail/yourdomain.com
> 
> 
> 

Then remove the validation js from the email field that make it required in your .phtml.

Then create a custom module that override your checkout controller (assuming one page checkout)

/app/code/core/Mage/Checkout/controllers/OnepageController.php

```
/**
 * save checkout billing address
 */
public function saveBillingAction()
{
   ... 
   if (isset($data['email']) && strlen($data['email']) > 3) {
        $data['email'] = trim($data['email']);
   }
   else{
       $data['email'] = getNoEmailGen(); // return noemail+[timestamp]-[ipaddress to long]...
   }

```

(You could also do this using JS, where you pre generate the email address (in a hidden field or variable) and if email field is left blank you append/post it before submitting your billing form)
You shouldn't do that because when you order something, transactional mails are going to take place so you can't have users without mail. This should be weird.