Support » Plugin: Ultimate Member - User Profile, Registration & Membership Plugin » Whitelist Multiple Domains for Registration

  • Hello, I had found an old topic, HERE, on whitelisting multiple domains for registration back in October 2015. In it you stated that you, “did not have a live working example yet, I’ll update you once we have an example of doing such code modification.”

    Just wondering if you have one now. I would like to allow certain e-mail domains to register and block all others.

Viewing 7 replies - 1 through 7 (of 7 total)
  • A valid request to post here if people before asked about it, or the UM team said they would add.

    I’m not sure if any of the snippets in that thread worked or not.

    Anyway, I have a simpler solution that may work on a UM registration form. The code was tested to white-list email domains on one site and it works.

    Because a user will encounter an error when trying to register with the wrong email service, they must an error alert. My says: “Your email service is not allowed to register here”.

    We cannot provide support for custom changes of code here so Google that (in quotes) and you should find it.

    • This reply was modified 3 years, 4 months ago by borisv.

    Thank You that seemed to do the trick. Much appreciated. The only difference was in changing the error message.

    Instead of replacing this string:

    $err = __(‘An error has been encountered’,’ultimatemember’);

    replace this string:

    $err = __(‘We do not accept registrations from that domain’,’ultimatemember’);

    with this string:

    $err = __(‘Your email service is not allowed to register here ‘,’ultimatemember’);

    Yes, but you’ve only changed the semantics. The error string can be obviously whatever you want.

    You’re also assuming that all your visitors are going to know the meaning of the word “domain”. Those who don’t may never come back to your site.

    “We do not accept registrations from that email service” would be better.

    Mark this topic as resolved.

    I don’t think you understood what I meant.

    $err = __(‘We do not accept registrations from that domain’,’ultimatemember’);

    is coded into the Ultimate Member plugin and it is the message that appears when a user tries to register an e-mail that is blacklisted. The string you recommend replacing/editing in your tutorial does’t display when a user enters a blacklisted e-mail address.

    The string you recommend replacing/editing in your tutorial does’t display when a user enters a blacklisted e-mail address.

    Hmm… well that’s a surprise! Just tested it on yet another site, so it should work. This is what you are supposed to see:
    message alert

    Did you replace the filter in um-actions-misc.php per my instructions? Otherwise, you will not see this dynamic url generated after the form is submitted and reset:

    http://your-site.com/register/?err=whitelisted_email_required

    Could you mark this post as resolved (and perhaps give UM a good rating)?

    bigbankclub

    (@bigbankclub)

    Not sure if this will help me.

    I’m looking to White-list domains that will automatically be approved instead of waiting for admin approval.

    Any option for this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Whitelist Multiple Domains for Registration’ is closed to new replies.