WordPress.org

Ready to get started?Download WordPress

Forums

Ban Hammer
[resolved] Block Domain Email Address or Email Address (10 posts)

  1. sweetmelody
    Member
    Posted 2 years ago #

    I'm looking for a plugin which could block a user email address from 'reregistering' my site. I wonder your plugin could block an email address (example: 123@yahoo.com, 123@gmail.com) or it could only block email addresses from a domain (examples: all email addresses ended with @yahoo.com or @gmail.com).

    Thank you!

    http://wordpress.org/extend/plugins/ban-hammer/

  2. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod
    Plugin Author

    Posted 2 years ago #

    You can do both. :)

    If you put in @yahoo.com, everyone @yahoo.com is blocked, but if you put in foobar@yahoo.com then you ONLY block foobar :)

  3. sweetmelody
    Member
    Posted 2 years ago #

    Wow, thank you for the great invention. I'm loving it. Thank you!!! :D

  4. addesigns
    Member
    Posted 2 years ago #

    I'm searching for a plugin where I can say only allow .edu e-mail addresses to register? Is this possible with your plugin?

  5. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod
    Plugin Author

    Posted 2 years ago #

    Not directly.

    I mean, you could try to list every possible NON .edu domain but http://wordpress.org/extend/plugins/user-domain-whitelist/ may be more to your liking.

  6. addesigns
    Member
    Posted 2 years ago #

    Okay, thanks for the response! I have User-Domain-Whitelist already, but I wasn't sure if I could simply list '.edu' and not 'blahblah.edu', but this is possible?

  7. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod
    Plugin Author

    Posted 2 years ago #

    Try it? It looks like it.

  8. RonStrilaeff
    Member
    Posted 2 years ago #

    Hi,

    Thanks for putting this together.

    If I put in just "infoblasters" (without quotes) in my discussion blacklist will it prevent something like feb14_123@infoblasters.com from registering? Or do I have to actually put in the full "@infoblasters.com" ?

    Thanks,
    Ron

  9. RonStrilaeff
    Member
    Posted 2 years ago #

    Ok, I guess I can answer my own questions:
    1. Yes
    2. No

    This line (73) of ban-hammer.php
    if(stripos($user_email, $blacklist_current) !== false)
    Says that if any part of the blacklist string is included in the registering e-mail address, then it will be rejected.

    Also as you stated in your documentation, the blacklist strings are copied from the comment blacklist strings.

    So... we have to be a bit careful not to put potentially legit domain names in the comment blacklist of words. (I can't think of one off-hand though.)

    And I just tested that on my live site to verify. Nice job ipstenu!

  10. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod
    Plugin Author

    Posted 2 years ago #

    Watch out for 'parts of words.'

    Like I remember having cialis in my blacklist and specialist got caught.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags