User Registration – Custom Registration Form, Login Form And User Profile For WordPress - Version 1.8.2.1

Version Description

  • 20/03/2020
  • Fix - Unable to Login User Due to Pending Status.
  • Fix - Recaptcha Backward compatibility
Download this release

Release Info

Developer wpeverest
Plugin Icon 128x128 User Registration – Custom Registration Form, Login Form And User Profile For WordPress
Version 1.8.2.1
Comparing to
See all releases

Code changes from version 1.8.2 to 1.8.2.1

includes/admin/class-ur-admin-user-list-manager.php CHANGED
@@ -202,10 +202,10 @@ class UR_Admin_User_List_Manager {
202
 
203
  $form_id = ur_get_form_id_by_userid( $user_id );
204
 
205
- if ( $column_name == 'ur_user_user_status' ) {
206
  $user_manager = new UR_Admin_User_Manager( $user_id );
207
  $status = $user_manager->get_user_status();
208
- return $status;
209
  } elseif ( $column_name == 'ur_user_user_registered_source' ) {
210
  $user_metas = get_user_meta( $user_id );
211
 
202
 
203
  $form_id = ur_get_form_id_by_userid( $user_id );
204
 
205
+ if ( $column_name == 'ur_user_user_status' && 'admin_approval' === ur_get_single_post_meta( $form_id, 'user_registration_form_setting_login_options', get_option( 'user_registration_general_setting_login_options', 'default' ) ) ) {
206
  $user_manager = new UR_Admin_User_Manager( $user_id );
207
  $status = $user_manager->get_user_status();
208
+ return UR_Admin_User_Manager::get_status_label( $status );
209
  } elseif ( $column_name == 'ur_user_user_registered_source' ) {
210
  $user_metas = get_user_meta( $user_id );
211
 
includes/admin/class-ur-admin-user-manager.php CHANGED
@@ -137,42 +137,16 @@ class UR_Admin_User_Manager {
137
  }
138
 
139
  $user_status = get_user_meta( $this->user->ID, 'ur_user_status', true );
140
- $label = '';
141
- if ( $user_status !== '' ) {
142
-
143
- // If the exact_value is true, allow to understand if an user has status "approved" or has registered when the plugin wash not active
144
- if ( $exact_value ) {
145
- return $user_status;
146
- }
147
-
148
- // If the status is empty it's assume that user registered when the plugin was not active, then it is allowed
149
- $user_status = ( $user_status == array() ) ? self::APPROVED : $user_status;
150
-
151
- if ( '1' === $user_status ) {
152
- $label = __( 'approved', 'user-registration' );
153
- }
154
-
155
- if ( '0' === $user_status ) {
156
- $label = __( 'pending', 'user-registration' );
157
- }
158
-
159
- if ( '-1' === $user_status ) {
160
- $label = __( 'denied', 'user-registration' );
161
- }
162
- } else {
163
- $val = get_user_meta( $this->user->ID, 'ur_confirm_email', true );
164
- $token = get_user_meta( $this->user->ID, 'ur_confirm_email_token', true );
165
-
166
- if ( '1' === $val ) {
167
- $label = __( 'verified', 'user-registration' );
168
- } elseif ( '0' === $val && isset( $token ) ) {
169
- $label = __( 'pending', 'user-registration' );
170
- } elseif ( '' === $val ) {
171
- $label = __( 'approved', 'user-registration' );
172
- }
173
  }
174
 
175
- return ucfirst( $label );
 
 
 
 
176
  }
177
 
178
  /**
137
  }
138
 
139
  $user_status = get_user_meta( $this->user->ID, 'ur_user_status', true );
140
+ // If the exact_value is true, allow to understand if an user has status "approved" or has registered when the plugin wash not active
141
+ if ( $exact_value ) {
142
+ return $user_status;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
144
 
145
+ // If the status is empty it's assume that user registered when the plugin was not active, then it is allowed
146
+ $user_status = ( $user_status == '' || $user_status == array() ) ? self::APPROVED : $user_status;
147
+ // If the value requested is not the exact value, than store it in the object
148
+ $this->user_status = $user_status;
149
+ return $user_status;
150
  }
151
 
152
  /**
includes/class-ur-ajax.php CHANGED
@@ -87,7 +87,7 @@ class UR_AJAX {
87
  $recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );
88
  $secret_key = 'v3' === $recaptcha_version ? get_option( 'user_registration_integration_setting_recaptcha_site_secret_v3' ) : get_option( 'user_registration_integration_setting_recaptcha_site_secret' );
89
 
90
- if ( 'yes' === $recaptcha_enabled ) {
91
  if ( ! empty( $captcha_response ) ) {
92
 
93
  $data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $captcha_response );
87
  $recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );
88
  $secret_key = 'v3' === $recaptcha_version ? get_option( 'user_registration_integration_setting_recaptcha_site_secret_v3' ) : get_option( 'user_registration_integration_setting_recaptcha_site_secret' );
89
 
90
+ if ( 'yes' == $recaptcha_enabled || '1' == $recaptcha_enabled ) {
91
  if ( ! empty( $captcha_response ) ) {
92
 
93
  $data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $captcha_response );
includes/class-ur-form-handler.php CHANGED
@@ -328,7 +328,7 @@ class UR_Form_Handler {
328
  $validation_error = new WP_Error();
329
  $validation_error = apply_filters( 'user_registration_process_login_errors', $validation_error, $_POST['username'], $_POST['password'] );
330
 
331
- if ( 'yes' === $recaptcha_enabled ) {
332
  if ( ! empty( $recaptcha_value ) ) {
333
 
334
  $data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $recaptcha_value );
328
  $validation_error = new WP_Error();
329
  $validation_error = apply_filters( 'user_registration_process_login_errors', $validation_error, $_POST['username'], $_POST['password'] );
330
 
331
+ if ( 'yes' == $recaptcha_enabled || '1' == $recaptcha_enabled ) {
332
  if ( ! empty( $recaptcha_value ) ) {
333
 
334
  $data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $recaptcha_value );
includes/shortcodes/class-ur-shortcode-login.php CHANGED
@@ -41,7 +41,7 @@ class UR_Shortcode_Login {
41
  $redirect_url = isset( $atts['redirect_url'] ) ? trim( $atts['redirect_url'] ) : '';
42
  $recaptcha_enabled = get_option( 'user_registration_login_options_enable_recaptcha', 'no' );
43
 
44
- if ( 'yes' === $recaptcha_enabled ) {
45
  wp_enqueue_script( 'user-registration' );
46
  }
47
 
41
  $redirect_url = isset( $atts['redirect_url'] ) ? trim( $atts['redirect_url'] ) : '';
42
  $recaptcha_enabled = get_option( 'user_registration_login_options_enable_recaptcha', 'no' );
43
 
44
+ if ( 'yes' == $recaptcha_enabled || '1' == $recaptcha_enabled ) {
45
  wp_enqueue_script( 'user-registration' );
46
  }
47
 
languages/user-registration.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the User Registration package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: User Registration 1.8.2\n"
6
  "Report-Msgid-Bugs-To: wpeverest@gmail.com\n"
7
- "POT-Creation-Date: 2020-03-18 10:43:45+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -400,27 +400,18 @@ msgstr ""
400
  msgid "Impossible to create an UR_Admin_User_Manager object. Unkwon data type."
401
  msgstr ""
402
 
403
- #: includes/admin/class-ur-admin-user-manager.php:152
404
- #: includes/admin/class-ur-admin-user-manager.php:171
405
- #: includes/admin/class-ur-admin-user-manager.php:335
406
  msgid "approved"
407
  msgstr ""
408
 
409
- #: includes/admin/class-ur-admin-user-manager.php:156
410
- #: includes/admin/class-ur-admin-user-manager.php:169
411
- #: includes/admin/class-ur-admin-user-manager.php:339
412
  msgid "pending"
413
  msgstr ""
414
 
415
- #: includes/admin/class-ur-admin-user-manager.php:160
416
- #: includes/admin/class-ur-admin-user-manager.php:343
417
  msgid "denied"
418
  msgstr ""
419
 
420
- #: includes/admin/class-ur-admin-user-manager.php:167
421
- msgid "verified"
422
- msgstr ""
423
-
424
  #: includes/admin/class-ur-admin.php:121
425
  #. translators: 1: WooCommerce 2:: five stars
426
  msgid "If you like %1$s please leave us a %2$s rating. A huge thanks in advance!"
2
  # This file is distributed under the same license as the User Registration package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: User Registration 1.8.2.1\n"
6
  "Report-Msgid-Bugs-To: wpeverest@gmail.com\n"
7
+ "POT-Creation-Date: 2020-03-20 04:45:24+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
400
  msgid "Impossible to create an UR_Admin_User_Manager object. Unkwon data type."
401
  msgstr ""
402
 
403
+ #: includes/admin/class-ur-admin-user-manager.php:309
 
 
404
  msgid "approved"
405
  msgstr ""
406
 
407
+ #: includes/admin/class-ur-admin-user-manager.php:313
 
 
408
  msgid "pending"
409
  msgstr ""
410
 
411
+ #: includes/admin/class-ur-admin-user-manager.php:317
 
412
  msgid "denied"
413
  msgstr ""
414
 
 
 
 
 
415
  #: includes/admin/class-ur-admin.php:121
416
  #. translators: 1: WooCommerce 2:: five stars
417
  msgid "If you like %1$s please leave us a %2$s rating. A huge thanks in advance!"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: user registration, registration, user profile, registration form, login fo
4
  Requires at least: 4.0
5
  Requires PHP: 5.3
6
  Tested up to: 5.3.2
7
- Stable tag: 1.8.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -141,6 +141,10 @@ Yes, the plugin has a shortcode for the login form.
141
 
142
  == Changelog ==
143
 
 
 
 
 
144
  = 1.8.2 - 18/03/2020
145
  * Feature - Search Field introduced in form builder.
146
  * Enhancement - Prevent Core Login enabled with redirect login page.
4
  Requires at least: 4.0
5
  Requires PHP: 5.3
6
  Tested up to: 5.3.2
7
+ Stable tag: 1.8.2.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
141
 
142
  == Changelog ==
143
 
144
+ = 1.8.2.1 - 20/03/2020
145
+ * Fix - Unable to Login User Due to Pending Status.
146
+ * Fix - Recaptcha Backward compatibility
147
+
148
  = 1.8.2 - 18/03/2020
149
  * Feature - Search Field introduced in form builder.
150
  * Enhancement - Prevent Core Login enabled with redirect login page.
user-registration.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: User Registration
4
  * Plugin URI: https://wpeverest.com/plugins/user-registration
5
  * Description: Drag and Drop user registration form and login form builder.
6
- * Version: 1.8.2
7
  * Author: WPEverest
8
  * Author URI: https://wpeverest.com
9
  * Text Domain: user-registration
@@ -31,7 +31,7 @@ if ( ! class_exists( 'UserRegistration' ) ) :
31
  *
32
  * @var string
33
  */
34
- public $version = '1.8.2';
35
 
36
  /**
37
  * Session instance.
3
  * Plugin Name: User Registration
4
  * Plugin URI: https://wpeverest.com/plugins/user-registration
5
  * Description: Drag and Drop user registration form and login form builder.
6
+ * Version: 1.8.2.1
7
  * Author: WPEverest
8
  * Author URI: https://wpeverest.com
9
  * Text Domain: user-registration
31
  *
32
  * @var string
33
  */
34
+ public $version = '1.8.2.1';
35
 
36
  /**
37
  * Session instance.