I'm using Drupal 7.57 and I have 2 roles in my website, role X and role Y.
I want to compare a field (field_code_postal
) of the X member profile of the current-user, with the fields (field_code_postal
) of all Y members profiles, and this when X member save a new entityform submission.
Each time the field field_code_postal
is the same, an email should be sent to that Y member.
So if there are 100 Y members and for 20 of them the value of the field is equal to the value of it for the current user X, then 20 emails are sent.
Do I need to use flags, or are the roles sufficient?
I'm a bit lost, any help?