Adding Role based on Taxonomy Field for a User

Events happening in the community are now at Drupal community events on www.drupal.org.
gmak's picture

Hi,

I'm new to using Rules, so I'm struggling a bit.

In D7, I have some fields added to the User. One of these is a taxonomy field that I'm using to relate groups of users to different pieces of content.

What I'd like to do is change a user's role (when their account is created) based on the taxonomy they select in the registration phase (or when they change the taxonomy when updating their account). Seems simple enough, but I'm not having any joy.

I have tried:

Event
After updating an existing user account

Condition
Data Comparison
Parameter: Data to compare: [account:field-stage], Data value: Stage 1

Action
Add user role
Parameter: User: [account], Roles: student

But if I make a change to the account nothing is happening to the roles.

Any ideas?

Thanks in advance.

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: