0

This is for a Drupal 6 install.

In rules there is an IF statement available of "If user has roles" and this can be set to be either an "and" statement or an "or" statement.

Within DO is an option to send an e-mail to everyone of a selected role.

I'd like to combine the selector of "if user has roles" using the "and" portion with the DO action of send e-mail to everyone of a selected role.

The site is currently using workflow & revisioning. Using Node Privacy Byrole I've assigned certain parts of the website to a specific department for editing.

Then using Workflow Access I've set up authors, editors, and publishers to limit the actions someone in a department may take on a node.

So there may be a user who is in the department role of "Marketing" and is also an "Editor." Then there may also be someone who is in "Marketing" who is also a "Publisher."

I'd like to notify say the Marketing Publisher (2 different roles) when a post changes workflow state, then have the Marketing Editor notified when a post changes to a different workflow state.

The workflow state is already available as an IF statement within rules, I just need to figure out how to create the DO statement to allow me to send e-mails based on this combination of roles.

2

Two solutions come to my mind:

  1. Write a module that provides the action you require. See the Developer Documentation for Rules for how this is done.
  2. Write a module that adds users to the role "Marketing Publisher" whenever he as both the role "Marketing" and "Publisher". The module would only have to implement hook_user($op = 'update') and hook_user($op = 'insert').
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.