I was writing a comment on this post: http://drupal.org/node/1541616 But realised this might be a bigger problem / could use some more minds thinking about this first a lil bit, so a fresh issue:

As one of the maintainer for http://drupal.org/project/user_registrationpassword i would like to chip in a suggestion: can't we create something like 'User Register Redirect Unified' ? Or a hook modules can register to, so when they are active and correctly configured, those redirect/functions are set/called.

I'm struggeling a bit to get Commerce Checkout Redirect to work with User Registration Password and i've also seen couple other modules having similar issues. The problem: the way forms and especially submits are registered in the Commerce Checkout Redirect module overrides the submit array's first position in most cases. This is a potential problem, because we set it to the next empty spot in the array in User Registration Password, but this is sometimes also the first one in the list, and thus, it never works at this stage. I always see the waiting for approval message, and not the configured message that's set via User Registration Password if configured correctly.

To clarify: the hook_form_alter we hook into isn't called (or at least the submit is overridden) due to the fact the submit Commerce Checkout Redirect registers is set to [0]. (and some other small issues, calling register user form directly is another potential problem due to the lack of addon modules that can do something to that form in the current code.)

I'm not sure what the best way is to deal with this, i'm hacking both modules at the moment, even considering coding something real quick that could provide a 'unified registration redirect' module to fix this all a bit easier. The point where i'm stuck now is how to get the correct redirect to user_registrationpassword without tweaking to much code / giving in to less dynamic code. The last one made me start this issue. (i got a hackish version working now, but that's not even close to release-able, had to break some stuff from Commerce Checkout Redirect and add some to User Registration Password, but it was a nice test while writing this all.)

Would like to think/brainstorm a bit about this, i'm on IRC most of the times > name > Cluster.

Comments

vasike’s picture

Status: Active » Needs review

here is patch that should solved this issue: #1677106-3: Add user password recovery support.

bojanz’s picture

Status: Needs review » Fixed

The interoperability problems should now be fixed.

This module will soon be added to Commerce core (#1736850: Adding the checkout redirect feature) so I'm not sure we have more space for co-operation.

Status: Fixed » Closed (fixed)

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

Rob C’s picture

To wrap this one up:

I have updated User Registration Password. It indeed works, but i did need to tweak the module a bit. So this will be fully supported in the next 1.4 release.

I've also implemented a piece that forwards after account confirmation to the checkout form if a user has a cart order, making it play very nice together.

Only thing i noticed is the message set by Commerce checkout redirect on submit is (obviously) also shown again after user_registrationpassword_form_user_register_submit() is ran. Not a big deal, so i'll leave that to others.

Thanks!