• Is there any way to prevent people from registering using a certain email address, like mail.ru? I have had quite a few users sign up under that domain and would like to prevent it as I believe them to be spammers.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter bangbang023

    (@bangbang023)

    anyone?

    Not that I’m aware of. Have you tried the anti-spam plugins mentioned in a sticky at the top of the forums?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    There’s no action hook for it, but if you look in wp-include/functions-formatting.php and find the is_email($user_email) function, you could modify this to reject emails containing domains you don’t want to be able to register. Just do a preg_match for the domains you want to reject and return false if there’s a match. Then they will get back a message telling them that the email address isn’t correct. It won’t tell them why it’s incorrect either.

    There is a downside to this. This checks emails for pretty much every email function in the system, so users won’t be able to use those emails for comments either, if you allow unregistered users to comment.

    Thread Starter bangbang023

    (@bangbang023)

    hmm, ok thanks.

    I have the same problem, bangbang – and I’m more concerned that they’re trying to exploit WP in some way rather than as just SPAMmers…

    I wrote a plugin that will allow you to specify email domains (email.ru, etc..) that you want to restrict from registration.

    It works and is ready to be used, I just dont have time to post any info on my blog about it or set up the download.

    Ill post back after I get back from work and have the opportunity to release it ‘officially’.

    If you want to see it in action, feel free to try to register on my blog using any email address that uses:

    email.ru

    Gotta admit that I would like to see this myself. We have this feature in WPMu and, since I’ve taken my blog to “Membership required for making posts”, I’m seeing a fair amount of users signing up where I know that they’re going to spam.

    Make that three of us….

    well, the good news and the bad news.

    the plugin works in 2.1.x but not in 2.0.x

    they added 2 more registration hooks in 2.1.x (finally)

    Until 2.1 is final, I will write up a HOW-TO for using it as as include, it will mean adding 1 line to wp-register.php

    I toyed with just explaining how to add your own hook, but you still end up editing a core file, so neither one is more ideal, and the include option is more understandable.

    Very cool, m’friend! Looking forward….

    This worked perfectly for me – thanks for the extra explanation!

    I was going to say we’ve had this feature in the WPMu platform for quite some time now. Surprised it didn’t make it into 2.1.

    Very much used on my WPMu site.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Way to block certain email domains from registering?’ is closed to new replies.