Active
Project:
Content Profile
Version:
6.x-1.0
Component:
User registration module
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2011 at 14:45 UTC
Updated:
16 May 2011 at 01:12 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commented+1
Comment #2
jamiehollernI've made some progress on this. By emptying caches I've managed to print the form array for user_register but this is a very small form and not what I'm looking for. Then, I tried to print the node form that the content profile is based on and voila, it printed. However it hasn't printed everything so I can't see the whole array.
Comment #3
jamiehollernApologies, but it seems that my progress was not what I thought it was. I'm back at square one. I've tried to use hook_form_alter to add a new validation function but it won't work on user sign up. A nudge in the right direction would be much appreciated.
Comment #4
jamiehollernBump. This is really starting to get frustrating. I have a perfectly good function that needs to run in order for my site to work properly and this stupid module is ensuring that it is impossible to do. Could one of the developers please just point me and everyone else who has this problem in the right direction? Why does hook_form_alter not affect a content profile registration form? How do you override this behaviour? I'm doing everything right but this module behaves in a way that obstructs other modules.
Comment #5
Anonymous (not verified) commentedPlease help us. Same problem here ;(
Comment #6
grendzy commentedcontent_profile_registration is installed with a system weight of 1 - so if you need your alter hooks to run after content_profile you'll need to adjust the weight of your custom module to something higher than 1. See http://drupal.org/node/110238
Comment #7
jamiehollernThanks very much for this, it's a good start. In my case, I am trying to alter values before they are submitted to the database but after the content profile registration form has been rendered. I'm unsure how to approach this, as I need my submit function to run before the data hits the database, but I'm not sure when $form_state['content_profile_registration'] is created.
I have tried to alter my $form_state in a [#submit] function that I array_unshift to be the first that runs but for some reason, $form_state['content_profile_registration'] still doesn't contain my altered values, even though $form_state['values'] contains the altered values.
Can anyone tell me the best way to (cleanly) alter these values before node_save is called?
Comment #8
baaj commentedHey, I'm trying to do much the same thing. Were you able to figure this out?
Thanks!