I've seen people post patches to past versions of Drupal that allow user registration without requiring an email address. I've recently written a patch to user.module for 4.7 that does the same. The reasoning behind this is due to the application. We are using Drupal for an intranet where access to employee information is not possible, and email is not allowed. Because of this, users have to register and an admin has to approve. I have something that works so I don't need to know how to do it. What I need to know is if there is a better way and if this has any chance of getting in to core. At the moment I just patch user.module. Is it possible to do this with a module? If not, is there enough interest to get this as a core option? Whare are the core developers' takes on this? ~Rob -- ---------------------------------------------------------- It is by Caffeine alone that I set my mind in motion It is by the beans of Java, that my thoughts acquire speed The hands acquire shakes; the shakes become a warning It is by Caffeine alone that I set my mind in motion
Robert Wohleb wrote:
I've seen people post patches to past versions of Drupal that allow user registration without requiring an email address. I've recently written a patch to user.module for 4.7 that does the same.
The reasoning behind this is due to the application. We are using Drupal for an intranet where access to employee information is not possible, and email is not allowed. Because of this, users have to register and an admin has to approve.
I have something that works so I don't need to know how to do it. What I need to know is if there is a better way and if this has any chance of getting in to core. At the moment I just patch user.module. Is it possible to do this with a module? If not, is there enough interest to get this as a core option? Whare are the core developers' takes on this?
~Rob
using form api, you can change email to a hidden field and just put a dummy unique value for the email address. no patch required.
- In my case, it would also be good to not require users to provide an email address. I'm implementing a series of modules that allow users to access Drupal functionality (events, audio entries, groups, etc.) by telephone and, since I'm working mainly with people from underserved communities that are either illiterate or do not have access to regular computers, I cannot expect my users to have email accounts (in fact, one of my modules provides voicemail accounts to make it easier for users to communicate among themselves). Ideally, it would be great if users wouldn't be forced to provide an email address. Wouldn't it be ok to create a special config setting for this and allow $user->email be set to NULL upon registration and updates? Best, Leo ----- Original Message ----- From: "Moshe Weitzman" <weitzman@tejasa.com> To: <development@drupal.org> Sent: Tuesday, June 06, 2006 7:52 AM Subject: Re: [development] User registration without email
Robert Wohleb wrote:
I've seen people post patches to past versions of Drupal that allow user registration without requiring an email address. I've recently written a patch to user.module for 4.7 that does the same.
The reasoning behind this is due to the application. We are using Drupal for an intranet where access to employee information is not possible, and email is not allowed. Because of this, users have to register and an admin has to approve.
I have something that works so I don't need to know how to do it. What I need to know is if there is a better way and if this has any chance of getting in to core. At the moment I just patch user.module. Is it possible to do this with a module? If not, is there enough interest to get this as a core option? Whare are the core developers' takes on this?
~Rob
using form api, you can change email to a hidden field and just put a dummy unique value for the email address. no patch required.
Agreed, just setting the email field to a dummy value and hidden causes a few problems. For example, it still generates an email. This is not very optimal. ~Rob Leo Burd wrote:
- In my case, it would also be good to not require users to provide an email address.
I'm implementing a series of modules that allow users to access Drupal functionality (events, audio entries, groups, etc.) by telephone and, since I'm working mainly with people from underserved communities that are either illiterate or do not have access to regular computers, I cannot expect my users to have email accounts (in fact, one of my modules provides voicemail accounts to make it easier for users to communicate among themselves).
Ideally, it would be great if users wouldn't be forced to provide an email address. Wouldn't it be ok to create a special config setting for this and allow $user->email be set to NULL upon registration and updates?
Best,
Leo
----- Original Message ----- From: "Moshe Weitzman" <weitzman@tejasa.com> To: <development@drupal.org> Sent: Tuesday, June 06, 2006 7:52 AM Subject: Re: [development] User registration without email
Robert Wohleb wrote:
I've seen people post patches to past versions of Drupal that allow user registration without requiring an email address. I've recently written a patch to user.module for 4.7 that does the same.
The reasoning behind this is due to the application. We are using Drupal for an intranet where access to employee information is not possible, and email is not allowed. Because of this, users have to register and an admin has to approve.
I have something that works so I don't need to know how to do it. What I need to know is if there is a better way and if this has any chance of getting in to core. At the moment I just patch user.module. Is it possible to do this with a module? If not, is there enough interest to get this as a core option? Whare are the core developers' takes on this?
~Rob
using form api, you can change email to a hidden field and just put a dummy unique value for the email address. no patch required.
-- ---------------------------------------------------------- It is by Caffeine alone that I set my mind in motion It is by the beans of Java, that my thoughts acquire speed The hands acquire shakes; the shakes become a warning It is by Caffeine alone that I set my mind in motion
Robert Wohleb wrote:
Agreed, just setting the email field to a dummy value and hidden causes a few problems. For example, it still generates an email. This is not very optimal.
You should be able to change the _submit function of the form, too. Cheers, Gerhard
If this doesn't belong in core then it sounds like good stuff for LoginToboggan -- http://drupal.org/node/34309 -- which is being actively supported by hunmonk. - Marc Robert Wohleb wrote:
Agreed, just setting the email field to a dummy value and hidden causes a few problems. For example, it still generates an email. This is not very optimal.
~Rob
Leo Burd wrote:
- In my case, it would also be good to not require users to provide an email address.
I'm implementing a series of modules that allow users to access Drupal functionality (events, audio entries, groups, etc.) by telephone and, since I'm working mainly with people from underserved communities that are either illiterate or do not have access to regular computers, I cannot expect my users to have email accounts (in fact, one of my modules provides voicemail accounts to make it easier for users to communicate among themselves).
Ideally, it would be great if users wouldn't be forced to provide an email address. Wouldn't it be ok to create a special config setting for this and allow $user->email be set to NULL upon registration and updates?
Best,
Leo
----- Original Message ----- From: "Moshe Weitzman" <weitzman@tejasa.com> To: <development@drupal.org> Sent: Tuesday, June 06, 2006 7:52 AM Subject: Re: [development] User registration without email
Robert Wohleb wrote:
I've seen people post patches to past versions of Drupal that allow user registration without requiring an email address. I've recently written a patch to user.module for 4.7 that does the same.
The reasoning behind this is due to the application. We are using Drupal for an intranet where access to employee information is not possible, and email is not allowed. Because of this, users have to register and an admin has to approve.
I have something that works so I don't need to know how to do it. What I need to know is if there is a better way and if this has any chance of getting in to core. At the moment I just patch user.module. Is it possible to do this with a module? If not, is there enough interest to get this as a core option? Whare are the core developers' takes on this?
~Rob
using form api, you can change email to a hidden field and just put a dummy unique value for the email address. no patch required.
On Jun 6, 2006, at 11:47 AM, Robert Wohleb wrote:
Agreed, just setting the email field to a dummy value and hidden causes a few problems.
in http://drupal.org/node/64221, i had good luck in form_alter() using a more drastic approach: unset(). ;) of course, you'd have to make sure the validate() and submit() hooks don't do something catastrophic if some form element they were expecting is totally gone... but, it worked for me in project. might work for you, too... -derek (dww)
The validate function checks for a valid email addy. As Marc pointed out, I suppose this should get rolled in to the logintoboggan module. ~Rob Derek Wright wrote:
On Jun 6, 2006, at 11:47 AM, Robert Wohleb wrote:
Agreed, just setting the email field to a dummy value and hidden causes a few problems.
in http://drupal.org/node/64221, i had good luck in form_alter() using a more drastic approach: unset(). ;)
of course, you'd have to make sure the validate() and submit() hooks don't do something catastrophic if some form element they were expecting is totally gone...
but, it worked for me in project. might work for you, too...
-derek (dww)
-- ---------------------------------------------------------- It is by Caffeine alone that I set my mind in motion It is by the beans of Java, that my thoughts acquire speed The hands acquire shakes; the shakes become a warning It is by Caffeine alone that I set my mind in motion
After some more research this isn't as easy as it appears. Using form_alter() is the easy part. The trouble comes with how user.module is handling form validation. If it was setting #validate I could easily override it, but it is doing validation through user_user(). Personally, I see this as a bug. Any thoughts? ~Rob Robert Wohleb wrote:
The validate function checks for a valid email addy. As Marc pointed out, I suppose this should get rolled in to the logintoboggan module.
~Rob
Derek Wright wrote:
On Jun 6, 2006, at 11:47 AM, Robert Wohleb wrote:
Agreed, just setting the email field to a dummy value and hidden causes a few problems.
in http://drupal.org/node/64221, i had good luck in form_alter() using a more drastic approach: unset(). ;)
of course, you'd have to make sure the validate() and submit() hooks don't do something catastrophic if some form element they were expecting is totally gone...
but, it worked for me in project. might work for you, too...
-derek (dww)
-- ---------------------------------------------------------- It is by Caffeine alone that I set my mind in motion It is by the beans of Java, that my thoughts acquire speed The hands acquire shakes; the shakes become a warning It is by Caffeine alone that I set my mind in motion
I have a related registration experience: There's the useability school of thought that wants users to minimize the number of clicks to do what they want, so in areas of a drupal site that require registration, I'm generating the registration form directly, instead of providing the usual link to /admin/user/register. In fact, I have to anyway, because these 'registration only' areas are not all the same - they don't always want the same registration fields to show up or be required. So, when non-registered users visit these sections (they're og pages, actually) I'm calling the user_register() function (from user.module), and noticing that the extra fields being added are erratic. For example, the profile module doesn't add it's fields (there's a test for arg() values that fails), but the og module does. In this case, I don't actually want the og checkboxes, so i'm doing the same trick as derek below, and unsetting it in my theme_user_register override i.e.. unset($form['og_register']). This works well (since there are no fancy validate/submit hooks for og), but putting the profile fields back in is more complicated that I would have thought or expected (since they do need validating, typically). Any other experiences or hints on this out there? And if you're still reading and know something about the user.module, do look here as well at what I think is a potential bug in that user_register function. http://drupal.org/node/66945 - Alan On 6/6/06, Derek Wright <drupal@dwwright.net> wrote:
in http://drupal.org/node/64221, i had good luck in form_alter() using a more drastic approach: unset(). ;)
of course, you'd have to make sure the validate() and submit() hooks don't do something catastrophic if some form element they were expecting is totally gone...
but, it worked for me in project. might work for you, too...
-derek (dww)
-- Alan Dixon, Web Developer http://alan.g.dixon.googlepages.com/
There are a lot of Drupal modules that rely on the basic assumption that all users have an email address. This is mainly an issue with contrib modules, such as notify, civicrm, simplenews, massmailer, and ecommerce. But even the core contact module makes this assumption. Removing the requirement of all users having an email address from Drupal core would be a big paradigm shift for Drupal, and is something that should be seriously considered before being implemented as a patch. Obviously, it's fine to use such a patch yourself, when you know that your own site has no need for email addresses, and that email is not available for most of your users. But for most Drupal sites, this is not the case. Cheers, Jaza. On 6/6/06, Robert Wohleb <rob@techsanctuary.com> wrote:
I've seen people post patches to past versions of Drupal that allow user registration without requiring an email address. I've recently written a patch to user.module for 4.7 that does the same.
The reasoning behind this is due to the application. We are using Drupal for an intranet where access to employee information is not possible, and email is not allowed. Because of this, users have to register and an admin has to approve.
I have something that works so I don't need to know how to do it. What I need to know is if there is a better way and if this has any chance of getting in to core. At the moment I just patch user.module. Is it possible to do this with a module? If not, is there enough interest to get this as a core option? Whare are the core developers' takes on this?
~Rob
-- ---------------------------------------------------------- It is by Caffeine alone that I set my mind in motion It is by the beans of Java, that my thoughts acquire speed The hands acquire shakes; the shakes become a warning It is by Caffeine alone that I set my mind in motion
Removing the requirement of all users having an email address from Drupal core would be a big paradigm shift for Drupal
not really. every registered user who comes in via distributed auth has no email address on in his user record and drupal mostly works fine for them. if modules can't handle this case, please file a bug. i think email free users is a valid use case for the drupal platform. just consider leo's project where many of his users are listening and posting audio nodes via telephone VOIP interface. -moshe
participants (8)
-
Alan Dixon -
Derek Wright -
Gerhard Killesreiter -
Jeremy Epstein -
Leo Burd -
Marc Poris -
Moshe Weitzman -
Robert Wohleb