Skip to content

Commit

Permalink
Recaptcha Backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
lekhnathpandey committed Mar 20, 2020
1 parent 4d5cfce commit b4a5839
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

= 1.8.2.1 - 20/03/2020
* Fix - Unable to Login User Due to Pending Status.
* Fix - Recaptcha Backward compatibility

= 1.8.2 - 18/03/2020
* Feature - Search Field introduced in form builder.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-ur-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static function user_form_submit() {
$recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );
$secret_key = 'v3' === $recaptcha_version ? get_option( 'user_registration_integration_setting_recaptcha_site_secret_v3' ) : get_option( 'user_registration_integration_setting_recaptcha_site_secret' );

if ( 'yes' === $recaptcha_enabled ) {
if ( 'yes' == $recaptcha_enabled || '1' == $recaptcha_enabled ) {
if ( ! empty( $captcha_response ) ) {

$data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $captcha_response );
Expand Down
2 changes: 1 addition & 1 deletion includes/class-ur-form-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public static function process_login() {
$validation_error = new WP_Error();
$validation_error = apply_filters( 'user_registration_process_login_errors', $validation_error, $_POST['username'], $_POST['password'] );

if ( 'yes' === $recaptcha_enabled ) {
if ( 'yes' == $recaptcha_enabled || '1' == $recaptcha_enabled ) {
if ( ! empty( $recaptcha_value ) ) {

$data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $recaptcha_value );
Expand Down
2 changes: 1 addition & 1 deletion includes/shortcodes/class-ur-shortcode-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function output( $atts ) {
$redirect_url = isset( $atts['redirect_url'] ) ? trim( $atts['redirect_url'] ) : '';
$recaptcha_enabled = get_option( 'user_registration_login_options_enable_recaptcha', 'no' );

if ( 'yes' === $recaptcha_enabled ) {
if ( 'yes' == $recaptcha_enabled || '1' == $recaptcha_enabled ) {
wp_enqueue_script( 'user-registration' );
}

Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Yes, the plugin has a shortcode for the login form.

= 1.8.2.1 - 20/03/2020
* Fix - Unable to Login User Due to Pending Status.
* Fix - Recaptcha Backward compatibility

= 1.8.2 - 18/03/2020
* Feature - Search Field introduced in form builder.
Expand Down

0 comments on commit b4a5839

Please sign in to comment.