I am in a process of finishing a workflow. I have done the most things with rules. To my surprise I found a feature is missing in this great module ...

I have created a content type called "my_cont_type". A content of this content type will be created only once by admin. A link will be provided for the admin to go and change the option whenever he wants.

It has a field called "my_field". It is a list box type where user can select multiple options. The options are "Role1" , "Role2", and "Role3".

On creating this content or after created admin can go and edit the same. After edited the same from that time the new user who all registering or created they have to come under the corresponding role selected in that node. I have those three roles already in my application.

For example:

  • When Role1 and Role2 is selected the new user has to register with these roles1&2 enabled.
  • When Role1 and Role3 is selected the new user has to register with these roles1&3 enabled.
  • When Role3 is selected the new user has to register with only roles3 enabled.

Can I accomplish this using the Rules module?

I tried but I doesn't find any attributes regarding node or content type in condition when using the "After new user saved" event.

  • Try using Content profile with Auto assign Role module.
    – niksmac
    Commented Apr 27, 2012 at 12:08
  • Which version of Drupal and which version of Rules are you using? Commented Apr 27, 2012 at 12:28

1 Answer 1


Yes this should be possible using the Rules module.

When trying to do so, make sure to add a Rules condition Entity has field (related to your my_field field). 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 you have read our privacy policy.

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