The attached patch will make userpoints_role send e-mail only if a message body is configured.

This way you can choose if you want to notify your users when they join/leave a role or not.

CommentFileSizeAuthor
userpoints-nomail.patch728 bytesflaviovs

Comments

jredding’s picture

Project: User Points » User Points Contributed modules
Version: 5.x-2.14 » 5.x-2.x-dev
berdir’s picture

Status: Active » Closed (won't fix)

Sorry for pinging the participants.

Now that Drupal 7 is out, there is no support for Drupal 5 and the
corresponding modules anymore. Therefore, I'm closing all old issues
which are still open.

I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature
is still needed or the bug still exists and open a new issue in that
case.

jamescl’s picture

Version: 5.x-2.x-dev » 7.x-1.x-dev
Status: Closed (won't fix) » Needs work

Can this be rolled into D7 - it would useful to not send out emails for either all or some role changes. This seems to be the simplest solution, but would require changes to UX as well to describe the behaviour.

spidersilk’s picture

Issue summary: View changes

Yes, please! I just installed this module on a client's site and was appalled to find there was no way of stopping it from sending out unwanted e-mails any time a user's status changes.

For the time being, I've commented out the applicable parts of the code*, because I can't have it doing that! Contributors are not going to understand all the stuff about roles and points, and I don't want it sending any e-mail to anyone unless and until the client decides they want it to and gives me some kind of approved text for the e-mail.

It really, really, should not be set to send mail by default at all, and especially not with no way to disable it! This is a major violation of the general standard of people having to opt in to receive any sort of e-mail notifications.

* For anyone else who needs a quick fix to prevent the module from e-mailing users, the two lines to comment out are (in the current dev version, at least):

Line 258: userpoints_role_send_mail('join', $uid, $role_point);

Line 268: userpoints_role_send_mail('leave', $uid, $role_point);

You could also comment out everything from lines 273-312, as those are functions called by the above, but if you comment out just those two lines, none of the functions will actually be invoked. For that matter, the function userpoints_role_mail() (lines 306-312) doesn't seem to be called anywhere at all - maybe that one's a leftover from the D6 version?

BTW, I may be able to contribute a patch for this issue, though it will probably take a week or two, as I have a lot on my plate right now.