I'm wondering if there's a way to add/edit/delete Taxonomy terms in a Rule with Drupal 7? I haven't found any way to do that.
Usecase: I'm trying to use Rules to maintain a (taxonomy) vocabulary of usernames of a certain role, so when a user's role is updated I add/remove their username.
This is how I would go about it:
In Rules UI:
1) In the events section I would select the option "After updating an existing user account".
2) In the condition section I would select the role which is updated.
3) In the Actions section I would write my own php code as I there is no option to change the users name there.
My php code:
As per rules you need to use the function hook_rules_action_info(). I would put this in a file mymodulename.rules.inc to reduce load.