function user_import_preconfigured_submit in User Import 5.2
File
- ./
user_import.module, line 626 - Import users from a comma separated file (csv).
Code
function user_import_preconfigured_submit($form_id, $form_values) {
$file = _user_import_file();
$form_values['filename'] = $file->filename;
$form_values['oldfilename'] = $file->filename;
$form_values['filepath'] = $file->filepath;
$form_values['setting'] = 'file set';
$import = _user_import_settings_save($form_values);
// submit the form using these values
$form_id = 'user_import_edit_form';
$field_values = array(
'return_path' => 'user_import/' . $form_values['template_id'] . '/' . $import['import_id'] . '/' . $form_values['og_id'],
);
$field_values['og_id'] = $form_values['og_id'];
$errors = drupal_execute($form_id, $field_values, $import['import_id'], $form_values['template_id']);
return;
}