Download & Extend

"Send to Both" option causes errors on user registration and failing email

Project:User registration notification
Version:6.x-1.10
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:Roadmap

Issue Summary

Notification emails are not sent when "Both" is selected and "Send notifications to this custom email address:" is filled with some role(s) selected. The user who tries to register gets error message and knows nothing what it means and how he should address it. Some users tries to re-register, some leave the site for good.

Current work-around - do not use "Send to both" option.

Comments

#1

Status:active» needs review

Attached is a patch that:
1. addresses that issue of "Send to both" giving error message to register user.
2. Removes duplicate email addresses from send to list, if any
3. Removes empty log message that carries no meaning

AttachmentSize
urn_both.patch 2.28 KB

#2

I need to do some testing. I don't see anything wrong with the patch but it will only catch duplicate addresses if you only enter 1 custom address. It will catch dupes but if you enter several emails all separated by comma's it wont work.

#3

#4

Status:needs review» reviewed & tested by the community

#5

Oh, I see, you're right - it won't catch duplicates if there are multiple addresses in the "Send notifications to this custom email address:" field. I know how to fix that though. New patch attached. The trick is using preg_split():

$emails = preg_split('/,[\w]+/', variable_get('user_register_notify_mailto', $from));
AttachmentSize
urn_both.2.patch 2.32 KB

#6

Status:reviewed & tested by the community» needs review

#7

Committed to CVS. Will be in the 6.x-1.11.

Thanks
Robert

#8

Status:needs review» fixed

#9

Status:fixed» closed (fixed)

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