[support] Using drupal_http_request()
Steve Edwards
killshot91 at comcast.net
Wed Nov 21 06:20:18 UTC 2007
I've jumped in to finish up a site that someone else started (yee ha!), and I need to do two things with the user registration data:
1) Add some custom fields to the user registration form (i.e. address/city/state/zip, job title, occupation, company, etc.)
2) Use the data to add the user to an embedded mail list manager program (Oempro by Octeth).
Oempro can generate a script that adds the data to their database, and I can post to that script. I modified the user
registration form and added fields using hook_form_alter(), and that works fine. The next step is to use hook_user() when $op ==
'insert' to post the user data to the Oempro script using drupal_http_request(). This brings up two issues:
1) How can I access the user data in hook_user()? Is it part of $user at that point, or would it be in $edit? Or another place?
2) How do I use drupal_http_request()? Unfortunately I'm not very familiar with HTTP headers or with this function, so I'm not
sure what to do. For instance, do I put the form data (assuming I can get to it in hook_user()) to the $data parameter in array
form? And what do I put in the $header variable for a request like this?
Thanks.
Steve
More information about the support
mailing list