I have a webform which have a file field. In the user profile I have also created a file field.
I am using the webform for user registration So I am assigning the values from the webform to the user profile fields programmtically on webform submit.
But I am unable assing the uploaded file in the webform to the user profile file field.
I am using the following code for assigning the file.
$user->field_user_file['files']['und']['value'] = $form_state['values']['submitted']['field_webform_file'];
but it did not work.
Any Idea what should I do for this?