[support] Users without email addresses?

Marc Poris marc at funnymonkey.com
Fri Dec 12 07:30:26 UTC 2008


If you are adding users via API, there shouldn't be any need to supply 
an email address.  This has worked fine for us for a long time in Drupal 
5.x:

  $new_user = user_save('',
    array(
      'name' => $name,
      'pass' => $pass,
      'roles' => array(),
      'status' => 1
    )
  );

- Marc



Daniel Carrera wrote:
> That's an interesting idea. Thanks.
>
>
> Steve Kessler wrote:
>   
>> A non-Drupal but educational response might be to use the free - student
>> emails from Gaggle.net
>> (http://www.gaggle.net/gen?_template=/templates/gaggle/html/index.jsp) - I
>> used these for students when I worked for Los Angeles Unified School
>> District. The free version has ads but teachers can monitor traffic and
>> there is extensive filtering. 
>>
>>
>> Steve Kessler 
>> Denver DataMan 
>> 303-587-4428 
>>
>>
>>
>> -----Original Message-----
>> From: J-P Stacey [mailto:jp.stacey at torchbox.com] 
>> Sent: Wednesday, December 10, 2008 9:22 AM
>> To: support at drupal.org
>> Subject: Re: [support] Users without email addresses?
>>
>>
>>     
>>> Yeah, that sounds like it should work - <student-id>@foo.com
>>>       
>> If I were a hacker, I'd sit at foo.com or nowhere.com, and wait for the 
>> emails to come rolling in.
>>
>> For fake emails, always use @example.com:
>>
>> 	http://www.rfc-editor.org/rfc/rfc2606.txt
>>
>> To keep student emails properly fake, you could also create a stub 
>> module with hook_form_alter to add a validate method to the user-edit 
>> forms. That could check that the user was either (a) a teacher or (b) 
>> their email was of the format firstname.lastname at example.com .
>>
>> J-P
>>     
>
>   




More information about the support mailing list