Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adaptation of the “Members-only area” page: addition of a captcha

  • @mirax

    Participant

    Hello,

    I use the “Cloudflare Turnstile” plugin as a captcha on my site, in particular to protect forms.

    I have discovered that the “Members-only area” page, which I imagine is managed independently by BuddyPress, does not offer any captcha and therefore presents a potential vulnerability (spam, etc.).

    How can I adapt this page to add “Cloudflare Turnstile”?

    Example page here.

    Thank you, kind regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • @emaralive

    Moderator

    Do you have a link to the specific “Cloudflare Turnstile” plugin that you are utilizing? I’m asking because there appears to be several plugins that are available via the WordPress plugin directory.

    @mirax

    Participant

    Wordpress plugin : simple-cloudflare-turnstile

    I should point out that in the settings for this plugin, the “BuddyPress Register” checkbox is checked. The captcha is also visible on all of my forms (contact, WordPress login, etc.).

    I am looking for a way to add the captcha specifically to the “Members-only area” page.

    @emaralive

    Moderator

    The slug you provided corresponds to the Simple CAPTCHA Alternative with Cloudflare Turnstile plugin.

    The simplest solution is to force BuddyPress to use the standard WordPress login form, this can be accomplished by utilizing the bp_view_no_access_redirect_to_login_screen filter hook with a callback that returns a value of true. A one-liner approach is as follows:

    
    add_filter( 'bp_view_no_access_redirect_to_login_screen', '__return_true' );
    

    @mirax

    Participant

    Thank you for your help.

    After thinking it over, I decided to create a small mu-plugin that automatically redirects people who are not logged in and try to access a restricted page to the login page.

    This login page displays the correct captcha.

    Kind regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adaptation of the “Members-only area” page: addition of a captcha’ is closed to new replies.
Skip to toolbar