Would also be very nice to have some form of rules module integration (D6 +).

Some conditions perhaps in the context of user actions that would be available when you create a rule with the "User account has been created" event.

Eg,
Registration code matches.
Registration code is expired.

A custom event: "User registers with registration code" might be useful as well, if you cant workout how to take advantage of a preexisting event.

Comments

aidanlis’s picture

There is already rules module integration?

aidanlis’s picture

I've just double checked, and there is rules integration for a successful token being used in the registration process. I'd love some help adding more useful integrations, I'm not an expert with the rules module. How many hooks do you think are needed, and where in the flow should they be called? What data/objects should be passed to rules?

Are you able to implement any of these features?

JacobSingh’s picture

So who wrote it originally? It looks like it is there, but it isn't very useful.

What I would like is to know the category to which a regcode belongs. Perhaps I'll code it up, but would like to discuss w/ the original author first.

JacobSingh’s picture

Status: Active » Needs work
StatusFileSize
new3.29 KB

Okay, I whipped something up here. I think it's pretty damn handy, I'll probably blog about it later, and may make a feature package.

I'm marking it needs work, because there is a small warning in form.inc that I'm causing somewhere, and the language needs work, and it's 1:40am, and I need to sleep.

Check it out:

Create a new Rule:

Only local images are allowed.

Create a Condition:

Only local images are allowed.

Choose the new condition type:

Only local images are allowed.

Choose which categories it should cause it to fire:

Only local images are allowed.

aidanlis’s picture

Hey Jacob, that looks great!

I wrote the original rules integration, but as you can see I didn't get very far - just the basic integration so it would show up in the Rules module. I couldn't find any useful documentation on taking it any further.

Thanks for the patch, I'll let you do a few iterations first and then commit it and release a new version?

JacobSingh’s picture

Status: Needs work » Needs review
StatusFileSize
new3.35 KB

Okay here is another go.

aidanlis’s picture

Status: Needs review » Fixed

Awesome, committed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.