Optionally send email on user import

4 replies [Last post]
bkbetts
Offline
Joined: 03/29/2010
Status: 
Answered

The new feature of importing users and memberships by hooking into the User Import module is great.

One thing I would like is the ability to not send any email at all on user import. The User Import "Import" step already has a checkbox option (Send Email) to optionally send an email on user import.

I propose that in the ms_membership_user_import_after_save hook, the drupal_mail call should be wrapped in a conditional that honors User Import's "Send Email" value.

Thanks.

Leighton Whiting
Offline
Joined: 06/02/2009
This is a good idea, I'll see

This is a good idea, I'll see if I can get it added in to the next release.

Sincerely,
Leighton Whiting

Leighton Whiting
Offline
Joined: 06/02/2009
Bkbetts, I have added an

Bkbetts,
I have added an option to the form that will let you choose whether to send the email or not. See the screenshot to see what I mean. If you want to test it out now (I haven't tested it yet) then copy this code to your ms_membership.module file (replacing the functions that are already there).

Sincerely,
Leighton Whiting

AttachmentSize
ms_membership_user_import_code.txt 2.67 KB
user_import_email.PNG 20.32 KB
bkbetts
Offline
Joined: 03/29/2010
Looks good. Just tested.

Looks good. Just tested. Thanks!

Leighton Whiting
Offline
Joined: 06/02/2009
I'll get it into the next

I'll get it into the next release (Membership Suite 6.10)

Sincerely,
Leighton Whiting

Twitter Feed