I implement the myModule_webform_submission_insert($node, $submission) {...} function in my Module. It's a regestration webform so I want to save all the data from the webform into a the new user. The user has to upload a file during the registration. I have no idea how to save this file in the user as in $submission[15]['value'][0] I only receive a integer. I have no idea how to get the path the file was actually saved.
Can somebody tell me if it's possible to save the file (uploaded with webform registration form) in the $user_data Array which is the parameter for user_save()?
For example I have this
function blabla_webform_registration_webform_submission_insert($node, $submission) {
// $node->nid will be the node id of your webform
if ($node->nid == 22) {
$submitted_data = $submission->data;
//Get data from field
$file = $submitted_data[15]['value'][0];
//Now $file has the value
// $file[value][0] = 46
}
What can I do with '46'? :)
Best regards, Christian