2

I'm actually using a type with content profile in my user register form, and I'm trying to manipulate both the user and node data after submitted and inserted in database. I'm supposed to use hook_user with $op insert/after_update/update, but I dont get any data from my content profile node, just the user data, and I also tried hook_nodeapi also with $op insert/update, but got no success too.

I have a custom module, and also tried to change the weight in system, to be executed before the content-profile module.
This is driving me nuts!

Do you have any idea on how I can manipulate that in the user register submit?

1

I use hook_nodeapi() with the operation ID ($op) equal to "insert" (conditionally for the content profile content type) and then get at the user data with $account = user_load(array('uid' => $node->nid)).
Then, I do as I please with both the $node and $account data.

  • 1
    The problem is, as mentioned in the question the content profile creation is not passing under the nodeapi hook, propably because it is saved by a node_save. I wanna an alternative way to manipulate the content profile node in the register submit. – lnunesbr May 2 '11 at 12:27
  • Thanks for the down vote but a node_save triggers hook_nodeapi. I'm sorry that your attempted code did not work, but I run code regularly on clients sites using content_profile module that follows this exact pattern. There is no better alternative. – Jody May 2 '11 at 23:57
0

basically I had this problem, because I didn`t get my user register to be saving correctly the user or even the content profile... after a deep research over the google, i found a couple of instructions that solved my problem...

if you wanna checkout, see it at my blog: http://nunesweb.com/blogs/2011/07/12/integrating-content-profile-user-registration-drupal-6

thx lnunesbr

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.