Hi there,

I'm working on showing a registration form during the checkout process of Ubercart. I've set up content_profile to show the fields on the normal registration and it works fine (thanks for a great module btw). Unfortunately, calling user_register() to build the form during checkout doesn't display the content_profile fields because the content_profile code for this is in hook_form_alter() instead of hook_user('register').

I'm proposing that the code be moved to be more inline with core thus allowing system extensions to automatically get the 'content_profile injected' registration fields.

If I get enough +1's i'll move the code myself (I have a sponsor for it). I'm aware of another issue that will involve changes to content_profile_registration. #307639: All node fields/taxonomy/etc on registration form

CommentFileSizeAuthor
#2 410678_200904041803+1100.patch6.68 KBsammys
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NikLP’s picture

I'd like to see this, if only to experiment and see if it actually works. To my mind, there's been zero activity (of use) on the c_p_r module for some six months now, and it needs to move on.

Further to my comment on the "other" thread about this (http://drupal.org/node/307639) I am led to believe this is the correct way forward in any case.

sammys’s picture

Hi there NikLP,

I've implemented a prototype of this feature (i.e it's really yucky) to get a client's project out the door. It only does one c_p node type at this point. In any case, the code works as expected. Here is a patch of what i've done so far. I had to remove the field groups for the client so that stuff can be removed in the end result.

I'll refactor this to be more complete if I get time. I've left the old hook_form_alter() code there as a reference until it gets cleaned up.

--
sammys

fago’s picture

I'd be open to that change, but please keep it separated from any other changes.

mnlund’s picture

+1 for this!

I've struggled to include some content profile fields in the welcome email, and with this approach it's no problem at all! Thanks!

NikLP’s picture

@fago What's the score with this? Don't the recent changes you made make this issue null & void?

fago’s picture

Status: Active » Closed (won't fix)

Yep, it does. It's not in hook_form_alter() now, but the code is separated better and easy to reuse - so this isn't necessary any more.

cnolasco’s picture

great, solved my problem.
best regards

mnlund’s picture

This has to go into the codebase. I.e. content profile fields in rule sets on user creation doesn't work without this. Please commit this very useful patch.

NikLP’s picture

Status: Closed (won't fix) » Closed (fixed)

AFAIK this issue is no longer relevant.

hanoii’s picture

Category: task » support
Status: Closed (fixed) » Active

Bringing this one back to life, although haven't seen much activity on this module lately, but.. I think this might be a good approach. I am also now going through some Ubercart development and I found a different use-case with the same need. Ubercart can create an account when checking out some products, which uses user_save() to store the new account details. Wouldn't be the logical approach that this module could create accounts on hook_user rather than on a form_alter?

I think I am going to sort this on a helper module, but just wondering.

hanoii’s picture

Component: Base module » User registration module