I would like to allow my users to register with out providing an email address. Ever! My reason is that if you require an email address on a children's website then you are required by FCC rules to notify their parents. By not collecting any "identifying" information you can avoid this.

This topic has been brought up before. See:


Although there is a hack to not send the users password to their email address, I haven't figured out how to completely remove the email address box from the registration page. Also, when the new user registration is verified a check is done to see if the email address is valid and unique.

I am new to Drupal and would appreciate any advice. I would prefer not to modify the core. Is it possible to do this in a module? Ideally there would also be an option in the admin pages to disable the email requirement. I would be glad to write a module if this is possible. What hooks would I use?


styro’s picture

I haven't used it but I think the login toboggan module might do what you want.

Also the form_alter hook can be used in a custom module to modify any form in Drupal or other modules with needing to edit others code.

New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal

Christefano-oldaccount’s picture

LoginToboggan allows signups without having to validate an email address, but it still requires an email address at the registration form. The Lazy Registration module may be a better alternative.

Lazy Registration hasn't been updated to D5 yet, though. pixelmonk (developer of Lazy Registration and the very cool Widont module) says he's working on updating it.

Another option is to use a different authentication service (like Drupal Distributed Authentication, OpenID, Facebook, Yahoo or Windows Live ID) and depend on the user already having an account somewhere else.

jcoffland’s picture

I looked at lazy registration. It does create temporary accounts for non-validated users but this is not quite what I want. There seem to be several modules which do things close to what I want to do. For example there is a module which allows for multiple accounts with the same email address which partially takes care of the new user registration validation issues. Maybe I'll have to look at the code for these modules and roll my own.

Any tips on where I can get more information about the forms interface. I've read some of the docs but it still is a bit confusing.

Thanks for your help.

Christefano-oldaccount’s picture

I didn't know about the multiple accounts module and found it after some searching. Thanks.

The Forms API is well-documented at http://drupal.org/node/37775

jcoffland’s picture

Awesome. Somehow I wasn't able to find that documentation. I'll report back when I have a clean solution.

jcoffland’s picture

I've create a new module which solves my problem as described above.

I am calling the module 'Local Email'. It provides the following features.

- When enabled removes email fields from new user registration and my account pages for non-admins
- Creates an email address of the form username@domain.
- Allows you to set the domain used in the administration interface.
- Optionally, allows you to not store any email information at all.

By creating an email address based on the users name on the website host you guarantee that applications expecting a unique email address wont get too confused.

In the future I would also like to add the ability to run a script when the email address is created. The script could create a real email address by configuring the systems email software.

The only problem remaining is that I don't have any idea how to submit a new module to drupal.org. In the mean time email me at drupal at the domain joe.coffland.com if you would like a copy of the code.

jcoffland’s picture

Never mind. I've applied for a CVS account.

Christefano-oldaccount’s picture

Thanks for figuring this out. I'm looking forward to trying your module.

jcoffland’s picture

Project Page: http://drupal.org/project/localemail

I've managed to get the Local Email module project up.

After my first round of code I quickly ran into another issue. How do you recover lost passwords. Local Email now also supports a security question for password retrieval purposes. The questions are configurable via the admin interface.

The module also integrates with Captcha http://drupal.org/project/captcha and TextImage http://drupal.org/project/textimage for image based Captcha verification. However, you should run the following SQL query to enable Captcha on the password recovery form.

INSERT INTO captcha_points (form_id,module,type) VALUES ('localemail_user_pass','image_captcha','Image');

I've done what I can to test this module but please let me know if you find any bugs.

mlncn’s picture

benjamin, Agaric