Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I have a rule that creates a term and a user. I'd like to know how can i implement a rule to force this new user with this new term created.
I know this doesn't exists yet, but i'm asking about some info of how to make it happen.
how should i begin? can you point me a procedure?
thanks
Comment | File | Size | Author |
---|---|---|---|
#2 | rules-integration-1034116.patch | 1.18 KB | carvalhar |
#2 | print.jpg | 62.67 KB | carvalhar |
#1 | rules_forced_term.zip | 1.21 KB | carvalhar |
Comments
Comment #1
carvalhar CreditAttribution: carvalhar commentedI created a simple module:
This module mix Rules and User Forced Term, creating a new action to be used with Rules.
This action has two arguments, a term and a user, both configurable by rules.
It's attached here.
bye
Comment #2
carvalhar CreditAttribution: carvalhar commentedhi,
I'm uploading a patch against 6.x-1.x (dev) to provide a new rule action: "Force a term to a user"
Usage:
Create a rule, load a term, and the new action will appear at "User -> Force a term to a user"
Tested at a fresh install with Forced Term 6.x-1.x-dev and Rules 6.x-1.4
Use Case:
After user is created and matches some rule conditions, we can set a term to a user by a rule.
Comment #3
carvalhar CreditAttribution: carvalhar commentedchanging status accordingly with drupal documentation.
Comment #4
attiks CreditAttribution: attiks commentedPatch looks good, for reference this started as a separate module: #1256318: User Forced Term by Rule
Comment #5
attiks CreditAttribution: attiks commentedupdating version according to #2