Can I remove/bypass the requirement to have unique email addresses?

I have no idea why but my backup plugin dropped most of my wp_users table from my database. Fine, I thought, I'd re-add my 1400 missing users with Batch Create.

The problem is that Batch Create has spotted that the email addresses of all the missing users are still in the database, principally in wp_registration_log.

Can I safely comment out the bit where Batch Create checks this, seeing as I know every user will just be restored to where they were before? I know I won't end up with multiple accounts sharing an email, I just need to re-associate them all with row in wp_users and give them privileges on the right sites.

(My hosting company's backup of my DB failed apparently .....! Nightmare.)

Failing this - if there are any MySQL boffins here - can I drop in the wp_users from an older backup of the database (the users haven't changed) or would this be suicidal?

  • digitsoft

    I think based on where you're at now...I'd try commenting out those lines (I looked in the code).

    I'd comment out those line, backup the db, test the import, and if it fails just revert.

    If the above fails and you want to try and sync instead of replacing, here are a few tools I've used:
    1. SQLYog - $99 (you'll need the single user enterprise - it's $99 without support) http://www.webyog.com/
    2. Workbench - free, but not as many options as sqlyog
    http://www.mysql.com/downloads/workbench/

    Lesson here - always backup your sites yourself and/or have multiple backup sources...I learned my lesson with that many years ago :wink:

  • Arun Basil Lal

    Hello webnik,

    How about you delete all users and import the users again, with the emails as well. This would make this right, wouldn't it?

    Of course, before you start anything, take a solid backup of what you have now, so that you don't end up getting worse.

    Backups often fail, sad that, no matter how many times others say, we only learn the lesson when the worst happens to us. Been there myself as well :slight_smile:

  • aecnu

    Greetings webnik, Arun, and Rob,

    @Arun in 32 years of computing I have never ever seen a backup done properly fail. Never.

    @Rob great advice as always.

    @webnik

    We have not heard back from you as to the status of this issue.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU Dev member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.