2

I am importing a large set of users from a old CMS that has about 10k+ users that have no email or badly formatted emails.

I want to force this to import, but Drupal wants to validate the email string.

Is there anyway to temporarily disable this?

  • I should note that i'm doing this via CSV import and the user_import module. – Brandon Fields Aug 20 '11 at 7:17
1

Better will assign some email (e.g. unknown_XXX@garbage.com, where XXX is row number of csv) to email of unassigned users. There's tonn of software that work with CSV.
After importing, you can run sql update command that will assign to emails '' value for that garbage email.

p.s. Also you can setup Rules module, that check if email equal to garbage email and warn him to change his email.

  • I actually solved this issue all ready by editing the user_import function for validation & no email to force them to go through and wrote a quick script to add comments to user accounts with invalid emails to update all ready. Was one of those cases where a simple dirty temporary hack solved the issue was doing the typical "over thinking and over analyzing" – Brandon Fields Aug 20 '11 at 8:05
  • In further, try don't hack contributed modules (but you can create patches and move it to drupal.org), it's drupal rule :) – Nikit Aug 21 '11 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.