Viewing 1 replies (of 1 total)
  • I know your post is 10 months old, but yes.
    I wanted to restrict to .edu only addresses.
    I took a look at the code and all you need to do is change one line, you can even do it inside the plugin editor.

    The first three lines of the plugin code:

    function wp_email_restrictions_restrict($user_login, &$user_email, &$errors) {
      $user_email = urldecode($user_email);
      $domain = substr($user_email, -3);

    Change the third line to what I have above. Then in the settings, just put “com” or “net” or “edu” (no period). This will not work with domains longer than 3 or shorter than 2 characters. AN exception would be a two character domain with a leading period (like .us or .me). I was just modifying this for edu only so I didn’t have any desire to make it more complicated than it needed to be.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Email Restrictions] Can I restrict to top level domain (only .net or .com etc)?’ is closed to new replies.