Frage

We have been trying for a while to solve a Drupal Rules problem. The situation is;

On every cron run we would like to check for Users who have a certain Role. We will then send an email to those Users. But we only want this email to go once.

We are thinking therefore that we will create a new custom/hidden User field called 'email sent'. Then the rule will;

  • EVENT: On every cron run
  • CONDITION: Check for Users who have the role AND have a null value in that field
  • ACTIONS: Send an email to the users AND set the value of the user 'email sent field to 1.

We think this is possible but we can't see how you can set up a rule to do this. Any help really appreciated

War es hilfreich?

Lösung

I think that you can resolve your problem via a custom module where create an action rule that set this fields. In situation like yours I follow this method. Search hook_rules_action_info().

Or if you use profile2 module you can see if there is a rule that can be set this value. I think that there is because Profile2 support Rules.

M.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top