Skip to:
Content
Pages
Categories
Search
Top
Bottom

Made custom register page, now honeypot doesn’t work


  • juliantrueflynn
    Participant

    @juliantrueflynn

    I had this honeypot working perfect before. Now I made a custom register page and it’s no longer working for no reason. All I did was move the bp-legacy Buddypress to the /buddypress folder to create a child theme for edits. Everything is working besides the honeypot.

    Here’s a link to the code I have in my register page now:
    http://www.codeshare.io/yQACc

    Buddypress build:
    Buddypress Version 2.1.1
    WordPress 4.0.1
    Using DevDMBootstrap3 theme
    I haven’t edited any core files in WP/BP.

    Here’s the code I used that worked previously:

    // BuddyPress Honeypot
    function add_honeypot() {
        echo '';
    }
    add_action('bp_after_signup_profile_fields','add_honeypot');
    function check_honeypot() {
        if (!empty($_POST['system55'])) {
            global $bp;
            wp_redirect(home_url());
            exit;
        }
    }
    add_filter('bp_core_validate_user_signup','check_honeypot');
Viewing 4 replies - 1 through 4 (of 4 total)

  • danbp
    Moderator

    @danbp

    BP use wp_safe_redirect.
    See documentation in bp-core-functions.php:830

    or use
    https://github.com/pixeljar/BuddyPress-Honeypot


    juliantrueflynn
    Participant

    @juliantrueflynn

    Hm, so I added that plugin first to see if that would do anything. The spam requests are still very high (user spam sign-ups). Again, I’m just comparing this to before I did the new custom registration page – the code I put above in codeshare.io.


    danbp
    Moderator

    @danbp

    Have you changed your tables prefix or do you use the default wp_ ?
    Do you have a site admin account with “admin” as username ? If yes to both, change this.

    https://codex.wordpress.org/Hardening_WordPress


    juliantrueflynn
    Participant

    @juliantrueflynn

    Yes to the first, no to the 2nd — to be direct, not sure you’re following…

    You just gave steps for overall spam reduction (which, thank you), what I’m referring to is a problem that occurred from the custom registration page. I’m talking in the matter of an hour I went from no spam to lots of spam because of the custom registration page which code I gave above. What would cause that and how can I fix it?

    Why would this custom page cause the issues and why would the Honeypot plugin you gave not fix it or my old code — it’s doing the same thing I had before that worked perfectly? I could remove the custom registration page and the spam would stop, but I rather keep it though since I don’t want the default registration page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Made custom register page, now honeypot doesn’t work’ is closed to new replies.
Skip to toolbar