Skip to:
Content
Pages
Categories
Search
Top
Bottom

Bypass Email Requirement


  • metalhead
    Participant

    @aaronthomas1979

    Hello,

    First, I must mention that I know there have been other threads on this topic. However, I missed the conversation by years, and I need to reopen this discussion.

    Someone mentioned that they were able to bypass the wordpress email requirement by editing register.php to make it generate a random email address, insert it into the email address field, and then use CSS to hide the field on the form. They did not mention how they did all that though!

    This method of bypassing the WP email requirement would work for me because I use a plugin that disables email verification, and it leaves WP simply checking that the email address is in the the correct format, (somebody@something.something,) and that the email address is not currently in use.

    To be more specific, I need code that would do this:
    1) Generate a random email address each time register.php is loaded
    2) Make sure the random email address hasn’t already been used. If so, generate another.
    2) Assign signup_email to the value of the random email address

    If anyone could help me with this, you would also be helping many other people who want to accomplish this. I would be glad to elaborate and share with everyone how I used your help to make this work.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

  • Henry Wright
    Moderator

    @henrywright

    Note email addresses are used for password management (resetting a lost password for example). If members use dummy email addresses they risk being locked out of the site if they forget their password.


    metalhead
    Participant

    @aaronthomas1979

    There are other ways to give a user their password if they forgot it. Here’s my remedy for that:
    1) I use a plugin called “RegisterIPs.” It records the IP address they signed up with.
    2) I’ll display to them after they log on, like this:
    “You signed up with this IP address: 56.454.24.454”
    “Keep it someplace safe. You’ll need it if you ever lose your password.”
    3) Set a “Lost PW?” link to a form that will ask for their email address and that IP #
    4) Reply to them with their password ASAP (Manually)

    This process might seem weird, but it would work, and would help maintain trust.

    Anyway.. I’ve thought about this Email Bypass thing a bit more, and here’s a way to simplify it:

    1) Grab the username they entered in the beginning of the form, add “@metalheadswebsite.com” to the end of it, and assign that value to signup_email

    2) Hide the email field with CSS, and BAM! It’s a done deal.

    Does that sound more easy and logical? Better than using some weird random #?

    I still need help figuring out how to set the value to signup_email in that manner.

    Anyone? Anyone? Bueller? Bueller? 🙂


    metalhead
    Participant

    @aaronthomas1979

    (Resolved)


    boosty2
    Participant

    @boosty2

    Hi metalhead, long time since your last post.
    But I’ve been banging my head for a couple of hours trying to do something similar.

    I’ve hidden the email field, and set a default value to it (account@email.com).

    But whenever registering a new user, it’s blocked by the “existing email” error.

    Have you found a better solution? Or what was your way to set the value to the signup_email?


    boosty2
    Participant

    @boosty2

    What I just did it set the “signup_email” input to display: none and added this script to populate the email input with the username and generate a ‘fake’ email address username@domain.com.

        window.onload = function() {
            const domain = "@domain.com";
            var userName = document.getElementById("signup_username"),
            var emailAddress = document.getElementById("signup_email");
            userName.addEventListener('input', function() {
                emailAddress.value = userName.value + domain.valueOf();
            });
        };

    Very open for better suggestions 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar