1

I have created a Rules component which contains an action to send an mail.

And I have a rule created with the scheduler option. In this rule, I have set one condition like so:

if site:current-user field has value equals to something

then mail should be triggered,

otherwise it should not.

But it is sending an eMail in both cases. Any idea why?

2
  • could you post your exported rule? Sep 10, 2015 at 12:13
  • yes, please export your rule and component and paste both codes here so we can see what you are doing wrong.
    – No Sssweat
    Sep 10, 2015 at 13:19

1 Answer 1

1

Make sure to add a Rules condition Entity has field (related to your additional site:current-user-field in your Rules condition). And make sure to add that Entity has field condition BEFORE the condition you already have.

That's also what is mentioned in the Rules UI when you're adding a "data comparison" condition: somewhere it says "The data selector helps you drill down into the data available to Rules. To make entity fields appear in the data selector, you may have to use the condition 'entity has field' (or 'content is of type')".

For a video tutorial that illustrates the importance of this Entity has field condition, refer to Data types and data selection, especially what is shown between about 13:30 and 17:30 in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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