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.
For a site I'm working on, I'd like to be able to automatically create a set of registration codes when a certain Rules Event triggers. Providing a Rules Action that creates a Registration Code would be great.
Comment | File | Size | Author |
---|---|---|---|
#2 | regcode-rules-action-02.patch | 2.86 KB | smokris |
#1 | regcode-rules-action-01.patch | 2.98 KB | smokris |
Comments
Comment #1
smokrisA patch is attached, which adds a new "Create registration codes" Rules Action.
Comment #2
smokrisAlternate patch, which accepts a single
taxonomy_term
instead of alist<taxonomy_term>
(so, in a single rule, you can create a term and then use it to create a regcode).Comment #3
sumit@skytesters.com CreditAttribution: sumit@skytesters.com commentedYou missed to increment
value of i which results infinite loop of registration code being create.moreover you are not taking in consideration total length which results in increased length if we add prefix to it.
and as module is designed if no. of registration code is 1 only registration code produced should be the code with prefix character.....
sorry ,if something in wrong in English .hope things i wanted to convey are conveyed.
for which i made following modification...a newbie so code may not be optimised
Comment #4
bobfries CreditAttribution: bobfries commentedHas anyone had a deadlock issue running this rule action?
Using the following rule which attempts to create a new reg code using a hidden field when a group is created. It works most the time, typically the error comes when the client tests it!
Comment #5
TR CreditAttribution: TR commentedNew features need to be put into the current branch first, then backported to previous versions if there is community interest.