Skip to content

axew3.com

Php MySQL Javascript

  • Home
  • Forum
  • Free plugins
  • Supported plugins and Contact
    • WP_w3 VTP plugin: Video Killed the WordPress Star!
    • WPD – w3all WordPress Dropbox plugin
    • Contact Alessio Nanni

Tag: memberpress

Add google recaptcha to memberpress login page

I’ve come across to a problem for a site i’m following: they use memberpress login page, that unfortunately present a lack about brute force attacks: there is no way to add a google recaptcha so easily …
Since i had to resolve in short this issue, and since i use a simple google recaptcha plugin here at axew3.com to prevent robot’s fake registrations, i edited the code just a little two lines making it work also into memberpress. The explained trick could be easily done using any other recaptcha plugin, but this 156 lines plugin, can also be easily hacked for our scope and will do the simple dirty job as smooth, working fine example.

Download this plugin and install and configure it (or as you like, may download the plugin, apply modifications as below indicated, then upload into your plugin directory and install):
Simple Google reCAPTCHA

open the file

/wp-content/plugins/simple-google-recaptcha/simple-google-recaptcha.php

on it search for this line:

1
function sgr_check() {

just after add the follow:

1
2
3
if( isset($_REQUEST['mepr_process_login_form']) && isset($_REQUEST['mepr_is_login_page']) ){
sgr_verify($_REQUEST);
}

then search for:

1
add_action("init", "sgr_check");

change into:

1
add_action("init", "sgr_check", 9);

save and replace.

Now open:
/wp-content/plugins/memberpress/app/views/login/form.php
and immediately after this:

1
2
3
4
  <div>
        <label><input name="rememberme" type="checkbox" id="rememberme" value="forever"<?php checked(isset($_REQUEST['rememberme'])); ?> /> <?php _ex('Remember Me', 'ui', 'memberpress'); ?></label>
      </div>
      <div class="mp-spacer">&nbsp;</div>

add the follow (note that the code could be added wherever you want, but before the closing </form> tag):

1
<div class="sgr-recaptcha"></div>

Save and replace. If there is some payment/subscription process using same page to access (for example) a payment renew, then may something else need to be added to prevent action to fire when not needed.

Cheers to all lovely and cool people!

axew3Author axew3Posted on November 13, 2018January 4, 2019Categories WordPressTags how to, memberpress, memberpress google recaptcha, memberpress login recaptcha8 Comments on Add google recaptcha to memberpress login page

From Forums – Links mode

  • axew3General Installation and Integration Questions
    by axew3
    March 20, 2023 9:36 pm
  • axew3phpBB WordPress integration extension v2
    by axew3
    January 27, 2023 11:36 pm
  • axew3Coming 2.6.9 phpBB WordPress logs/bugs/requests
    by axew3
    January 23, 2023 9:15 pm

From forums – With text

  • axew3General Installation and Integration Questions
    Hello, i will try to explain in short any point: 1) You can use the integration WP phpBB plugin as standalone, ...
    by axew3
    March 20, 2023 9:36 pm
  • axew3phpBB WordPress integration extension v2
    The (awesome) w3all phpBB WordPress extension v2 Should work into any Php 5.6> and phpBB 3.2 or > Anyway it has been ...
    by axew3
    January 27, 2023 11:36 pm

wp w3all Login

Register

  Username

  Password

Remember me



I forgot my password

phpBB online users and stats

Most users ever online was: 640
Registered users: 575
Topics: 805
Posts: 4495
There are 8 guests and 2 users online
Majestic-12 [Bot]
Semrush [Bot]

WP login/out

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Recent Blog Posts

  • Switch WP user to specified Group in phpBB, when Role updated in WordPress and vice versa
  • Shortcode: phpBB notifications into WordPress
  • The (awesome) iframe template integration using shortcode
  • phpBB WordPress Integration Common Tasks extension
  • phpBB WordPress template integration (iframe v5)

Categories

  • General In-Out
  • Joomla!
  • Php tips and hints
  • phpBB
  • Server related
  • w3all plugins
  • WordPress
  • WordPress Ajax Chat integration
  • Wordpress phpBB integration

Tags

  • add
  • ajax
  • alessio
  • alessio nanni
  • another
  • axew3
  • bbcode
  • buddypress
  • comments
  • connection
  • content
  • db
  • default
  • different
  • domain
  • email
  • excerpts
  • external
  • feed
  • fields
  • how to
  • iframe
  • integration
  • last posts
  • last topics
  • nanni
  • notification
  • parser
  • phpbb
  • phpbb mchat
  • phpbb profile fields
  • phpbb wordpress template integration
  • pm
  • post
  • posts
  • profile
  • reset
  • shortcode
  • synchronize
  • template
  • template integration
  • transfer
  • users
  • widgets
  • wordpress
  • Home
  • Forum
  • Free plugins
  • Supported plugins and Contact
    • WP_w3 VTP plugin: Video Killed the WordPress Star!
    • WPD – w3all WordPress Dropbox plugin
    • Contact Alessio Nanni
© 2007 - 2022 - axew3.com Proudly powered by WordPress