When entering multiple e-mail addresses in the Invite a Friend form, only the last email in the lists is recognized and used for further processing. It won't send out multiple invitations at once; only one to the email that the user entered last.

Comments

glekli’s picture

Status: Active » Needs review
StatusFileSize
new620 bytes

I found a bug in the _invite_get_emails() function that caused this issue. Explode() was not able to split the string of emails, because it was given the three used delimiters ('\n', '\r', and ',') concatenated into one string as the first parameter. I guess that parameter was a leftover from an older version where split() was used instead of explode().

Attached is a patch to fix the issue. This patch assumes that the patch in http://drupal.org/node/1144862 and http://drupal.org/node/1068328 have previously been applied.

glekli’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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

technikh’s picture

Version: 7.x-2.x-dev » 7.x-4.x-dev
Status: Closed (fixed) » Active

this happens in 7.x-4.0-beta1

throws error
Email address abc@example.com, xyz@example.com is not valid.

mcalabrese’s picture

Issue summary: View changes
StatusFileSize
new4.65 KB

attached is a patch for 7.x-4.x which addresses this issue.
field_invitation_email_address will be seperated by comma's and a new invite entity will be created for each email address.

mcalabrese’s picture

Status: Active » Needs review
BeaPower’s picture

Does this work? If so please commit.

hackwater’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #5 is working for us.

jweirather’s picture

#5 RTBMe +1

and thank you!

ckng’s picture

Status: Reviewed & tested by the community » Needs work

Please reroll for latest dev then will review.

ckng’s picture

Title: Invite form recognizes one email only » Multiple emails support for Invite form
Category: Bug report » Feature request
ckng’s picture

Assigned: Unassigned » ckng
tjhart87’s picture

Assigned: ckng » Unassigned

This was still a bug as of 4.0 beta 5.

The codebase has changed a bit since the patch in #5 (was originally for 4.0 beta1) so it took a bit of a manual effort to hunt down the variables needing changed but I can confirm this patch works and is still relevant.

++ SpartyDan I know it's been a few months since the last commit ... any chance you can roll this into dev to make beta 6 with the next commit?

SpartyDan’s picture

@tjhart87
Would it be possible for you to post a re-roll of the patch? It sounds like you did all the work of applying #5 to beta5. It would be awesome if you could post your patch here.

ibraaheem’s picture

Thanks for all the good work.
Any hope of getting a patch for the release candidate - 7.x-4.1-rc1?