i'm using twitter module, then forcing user enter an email after registration email_confirm_build_mail throws an error because this line:

drupal_mail('email_confirm', 'confirmation_original_email', $user->mail, user_preferred_language($user), $params, $from);

it could be better add

if($user->mail)
drupal_mail('email_confirm', 'confirmation_original_email', $user->mail, user_preferred_language($user), $params, $from);

Comments

BassistJimmyJam’s picture

Title: module would be ready for emtpy current mail » Exception if user has no current email address
Issue summary: View changes
StatusFileSize
new1.01 KB

I ran into the same issue with a different source for user registration that does not provide an email address. Saving the user's profile with a new email address results in the following:

InvalidArgumentException: Address "" is invalid in Mail_Postmark->_addRecipient() (line 433 of /*/sites/all/libraries/postmark-php/Postmark.php).

I have attached a patch that resolves the issue.

BassistJimmyJam’s picture

Category: Feature request » Bug report
Status: Active » Needs review

Changing this to a bug report as I do not believe this is intended behavior.

  • jaydub committed 72fdbec on 7.x-1.x
    Issue #1737358 by BassistJimmyJam - changed isset() to !empty() call in...
jaydub’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Needs review » Fixed

Thanks for the patch. Makes perfect sense now that external logins/registrations are common with Facebook, Twitter, etc.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

klidifia’s picture

So this is just bypassing the verification process if there isn't an email to begin with?

Wouldn't it be better to still require validation to ensure that the email is legitimate, and instead perhaps not send an email to the old (non-existant) address?

sfcamil’s picture

Hy,

I use some other modules like User Import an Complete Profile. With User Import the users is created without email and Complete Profile force the user to fill an email when a session is opened. Then this module (Email Confirmation) try to send an email to confirm and that is what I want. But I don't have an OLD email (!) and I have an error when the module try to send email.

What klidifia suggest is better idea.

Any idea how to disable the module to send email to the old (non-existent) email address ?

Thank you all !