We have webforms for authenticated users (anyone can create an account without admin approval) to fill out. With their submission data I'm using the
civicrm_api to create contacts and relationships.
// in hook_webform_submission_insert I do this: $newcontact= civicrm_api3('Contact', 'create', array( 'sequential' => 1, 'contact_type' => 'Organization', 'contact_sub_type' => 'Sub_Type', 'organization_name' => $submission->data, ));
Is there any filtering I should be doing or are Drupal's security measures sufficient?
There are various hooks I could use. Currently I'm using a combination of
hook_form_alter with submit callbacks and
hook_webform_submission_insert. Would one of these or some other hook have significantly greater security measures?