# Importers: What to do when missing email addresses

**URL:** <https://meta.discourse.org/t/importers-what-to-do-when-missing-email-addresses/60195>\
**Category:** Development\
**Created:** [30 Marzo 2017, 9:00pm UTC](https://meta.discourse.org/t/importers-what-to-do-when-missing-email-addresses/60195 "2017-03-30T21:00:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [30 Marzo 2017, 9:00pm UTC](https://meta.discourse.org/t/importers-what-to-do-when-missing-email-addresses/60195/1 "2017-03-30T21:00:54Z")

</div>

I’m doing a phpBB import. There are a bunch of missing email addresses (apparently because Facebook and others authenticated, but didn’t supply an email address) and a bunch more invalid ones.

The client doesn’t want to have messages from those 12K (of 370K) users all lumped in to `@system`.

One solution I’m considering is modifying `create_users` in `base.rb` to call `create_user` when the email is missing (not sure why `create_users` needed to do that anyway, as create\_user checks too) and then modifying `create_user` to use {discourse\_username}@badmail.domain.com as the email address (Of course there are invalid usernames too, so I’ll go with the Discourse username).

This will mean that these users exist in the system, but if a user is to reclaim the account it’ll require manual intervention from an admin, which this client seems OK with.

### Questions:

- Is there some better way?
- Should I submit a PR?
- How long would such a change take a competent developer?

---

_[View the full topic](https://meta.discourse.org/t/importers-what-to-do-when-missing-email-addresses/60195)._
