Domanda

We have a fresh Drupal 6 site. The bulk of the site is a custom registration form built using the webform module that users will be filling out. It's not a site registration form, but a registration form for an event that people will be attending. So the situation is that we have users (not Drupal users) and data from past events that we would like to import.

Basically if a user already attended this event in the past, we want to import them as a new user in Drupal since this is the first year we are using Drupal for the registration process. We will have the user info and data from past events in a CSV file.

SO, I know you can bulk import users and I know you can bulk import webform data, but can you do both at the same time? I tried playing with the webform import module, but that just imports webform data, but cannot associate it to a specific user, at least not as far as I saw. You can provide an SID but not a UID. Something tells me this might be a tall order, but I figured I'd ask.

È stato utile?

Soluzione

I typically use a simple PHP script that bootstraps Drupal and uses the API to import my data directly. All you typically need to use the API is the first few lines of Drupal's index.php. I'd import the users into the user table first. Then grab the generated UID and use that to insert the matching webform data into the webforms submissions table.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top