By default, email to role(s) will send an email to users in any of the groups listed. This patch lets you set it so that it will send email to only the users in ALL the groups selected. The patch needs work because it will work on SQLite and pgsql, but not MySQL. I don't imagine it will be much work to come up with a cross platform query but I don't have time right now.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1393014-email_to_roles_intersection.patch | 2.67 KB | binford2k |
Comments
Comment #1
binford2k commentedComment #2
mitchell commentedComment #4
mitchell commentedMarked #1572144: Sending a mail to users based on roles as a duplicate.
Comment #5
mitchell commented>it will work on SQLite and pgsql, but not MySQL. I don't imagine it will be much work to come up with a cross platform query
Please see the Database API for that. And here's the api docs: http://api.drupal.org/api/drupal/includes!database!database.inc/group/da...
Comment #6
mitchell commentedI would prefer to take another approach described in #1699594: Remove Action: Send mail to all users of a specific role group(s). If it proves to be an undesirable direction, then I think we should reopen this issue. I do want to build out this functionality, but in think this current approach is based on multiple levels of code duplication. See also, #1699588: Set-theoretic arithmetic in conditions and actions.