From 7d8ef01091a3b385171247fd671e05940f604cc5 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Mon, 20 May 2024 14:06:21 +0300 Subject: [PATCH 1/7] - updated version; --- readme.txt | 4 ++++ ultimate-member.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index f18d1ee2..b62ef48a 100644 --- a/readme.txt +++ b/readme.txt @@ -166,6 +166,10 @@ No specific extensions are needed. But we highly recommended keep active these P IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSION 2.6.7 PATCHES SECURITY PRIVILEGE ESCALATION VULNERABILITY. PLEASE SEE [THIS ARTICLE](https://docs.ultimatemember.com/article/1866-security-incident-update-and-recommended-actions) FOR MORE INFORMATION += 2.8.7 2024-06-xx = + + + = 2.8.6 2024-05-22 = **Enhancements** diff --git a/ultimate-member.php b/ultimate-member.php index 879d4866..ea2c7aa5 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -3,7 +3,7 @@ * Plugin Name: Ultimate Member * Plugin URI: http://ultimatemember.com/ * Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress - * Version: 2.8.6 + * Version: 2.8.7-alpha * Author: Ultimate Member * Author URI: http://ultimatemember.com/ * Text Domain: ultimate-member From 8208d01bf81691e52775f9dfe586a56626addca9 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Mon, 20 May 2024 14:23:45 +0300 Subject: [PATCH 2/7] - fixed PHP errors when some custom registered fields are displayed without registration; --- includes/core/class-fields.php | 24 +++++++++++------------- includes/core/um-filters-fields.php | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 487add7e..6e1bc572 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -1513,24 +1513,24 @@ if ( ! class_exists( 'um\core\Fields' ) ) { return ''; } - /** * Get field label * - * @param string $key + * @param string $key Field meta key * * @return string */ - function get_label( $key ) { - $label = ''; + public function get_label( $key ) { + $label = ''; + $fields = UM()->builtin()->all_user_fields; + $field_data = array_key_exists( $key, $fields ) ? $fields[ $key ] : array(); - $fields = UM()->builtin()->all_user_fields; - if ( isset( $fields[ $key ]['label'] ) ) { - $label = stripslashes( $fields[ $key ]['label'] ); + if ( array_key_exists( 'label', $field_data ) ) { + $label = stripslashes( $field_data['label'] ); } - if ( empty( $label ) && isset( $fields[ $key ]['title'] ) ) { - $label = stripslashes( $fields[ $key ]['title'] ); + if ( empty( $label ) && array_key_exists( 'title', $field_data ) ) { + $label = stripslashes( $field_data['title'] ); } /** @@ -1556,13 +1556,11 @@ if ( ! class_exists( 'um\core\Fields' ) ) { * } * add_filter( 'um_change_field_label', 'my_change_field_label', 10, 3 ); */ - $label = apply_filters( 'um_change_field_label', $label, $key, $fields[ $key ] ); + $label = apply_filters( 'um_change_field_label', $label, $key, $field_data ); - $label = sprintf( __( '%s', 'ultimate-member' ), $label ); - return $label; + return sprintf( __( '%s', 'ultimate-member' ), $label ); } - /** * Get field title * diff --git a/includes/core/um-filters-fields.php b/includes/core/um-filters-fields.php index 8576e68a..745831f2 100644 --- a/includes/core/um-filters-fields.php +++ b/includes/core/um-filters-fields.php @@ -456,7 +456,7 @@ function um_profile_field_filter_hook__( $value, $data, $type = '' ) { $value = '' . esc_html( $alt ) . ''; } else { // check $value is oEmbed - if ( 'oembed' === $data['type'] ) { + if ( array_key_exists( 'type', $data ) && 'oembed' === $data['type'] ) { return $value; } From 491f12161e7c5ddce6b4f67410e761e4af62cd15 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Wed, 22 May 2024 00:30:58 +0300 Subject: [PATCH 3/7] - fixed wp_editor null value; --- includes/core/class-fields.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 6e1bc572..f4912f3e 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -2828,6 +2828,8 @@ if ( ! class_exists( 'um\core\Fields' ) ) { */ $textarea_settings = apply_filters( 'um_form_fields_textarea_settings', $textarea_settings, $data ); + $field_value = empty( $field_value ) ? '' : $field_value; + // turn on the output buffer ob_start(); From 3237da021504680a6d7fa70c4a0cd0573f6ea396 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 27 Jun 2024 11:26:50 +0300 Subject: [PATCH 4/7] - updated readme.txt; --- readme.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index b62ef48a..4e02a35f 100644 --- a/readme.txt +++ b/readme.txt @@ -10,13 +10,13 @@ Stable tag: 2.8.6 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.txt -The #1 plugin for front-end user profiles, user registration & login forms, member directories, content restriction, user roles and more. +Membership & community plugin with user profiles, registration & login, member directories, content restriction, user roles and much more. == Description == -= Best User Profile & Membership Plugin for WordPress = += User Profile & Membership Plugin for WordPress = -Ultimate Member is the #1 user profile & membership plugin for WordPress. The plugin makes it a breeze for users to sign-up and become members of your website. The plugin allows you to add beautiful user profiles to your site and is perfect for creating advanced online communities and membership sites. Lightweight and highly extendible, Ultimate Member will enable you to create almost any type of site where users can join and become members with absolute ease. +Ultimate Member is the membership & community plugin for WordPress. The plugin makes it a breeze for users to sign-up and become members of your website. The plugin allows you to add beautiful user profiles to your site and is perfect for creating advanced online communities and membership sites. Lightweight and highly extendible, Ultimate Member will enable you to create almost any type of site where users can join and become members with absolute ease. = Features of the plugin include: = From c021cb8b5bc3d4c9a9d438fdb587ffaa848c8c85 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 27 Jun 2024 11:29:31 +0300 Subject: [PATCH 5/7] - updated readme.txt; --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 4e02a35f..41f07557 100644 --- a/readme.txt +++ b/readme.txt @@ -16,7 +16,7 @@ Membership & community plugin with user profiles, registration & login, member d = User Profile & Membership Plugin for WordPress = -Ultimate Member is the membership & community plugin for WordPress. The plugin makes it a breeze for users to sign-up and become members of your website. The plugin allows you to add beautiful user profiles to your site and is perfect for creating advanced online communities and membership sites. Lightweight and highly extendible, Ultimate Member will enable you to create almost any type of site where users can join and become members with absolute ease. +Ultimate Member is the membership & community plugin for WordPress. The plugin makes it a breeze for users to sign-up and become members of your website. The plugin allows you to add beautiful user profiles to your site and is designed for creating advanced online communities and membership sites. Lightweight and highly extendible, Ultimate Member will enable you to create almost any type of site where users can join and become members with absolute ease. = Features of the plugin include: = From cd3a40c675a5bb10d1378ec799074fe039653c78 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Mon, 1 Jul 2024 10:21:49 +0300 Subject: [PATCH 6/7] - updated readme.txt; --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 41f07557..dce9b041 100644 --- a/readme.txt +++ b/readme.txt @@ -16,7 +16,7 @@ Membership & community plugin with user profiles, registration & login, member d = User Profile & Membership Plugin for WordPress = -Ultimate Member is the membership & community plugin for WordPress. The plugin makes it a breeze for users to sign-up and become members of your website. The plugin allows you to add beautiful user profiles to your site and is designed for creating advanced online communities and membership sites. Lightweight and highly extendible, Ultimate Member will enable you to create almost any type of site where users can join and become members with absolute ease. +The ultimate user profile & membership plugin for WordPress. The plugin makes it a breeze for users to sign-up and become members of your website. The plugin allows you to add beautiful user profiles to your site and is designed for creating advanced online communities and membership sites. Lightweight and highly extendible, Ultimate Member will enable you to create almost any type of site where users can join and become members with absolute ease. = Features of the plugin include: = From 2aaa7f936f3a5f4a9b3890dc9059fcbe41dc79fe Mon Sep 17 00:00:00 2001 From: ashubawork Date: Tue, 13 Aug 2024 14:08:47 +0300 Subject: [PATCH 7/7] - query improvement for count users --- includes/admin/class-secure.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/admin/class-secure.php b/includes/admin/class-secure.php index d9d56af0..30bb4ff2 100644 --- a/includes/admin/class-secure.php +++ b/includes/admin/class-secure.php @@ -182,7 +182,6 @@ if ( ! class_exists( 'um\admin\Secure' ) ) { */ public function add_settings( $settings ) { $nonce = wp_create_nonce( 'um-secure-expire-session-nonce' ); - $count_users = count_users(); $banned_capabilities = array(); $banned_admin_capabilities = UM()->common()->secure()->get_banned_capabilities_list(); @@ -245,7 +244,10 @@ if ( ! class_exists( 'um\admin\Secure' ) ) { ), ); - $count_users_exclude_me = $count_users['total_users'] - 1; + global $wpdb; + $count_users = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->users}" ); + + $count_users_exclude_me = $count_users - 1; if ( $count_users_exclude_me > 0 ) { $secure_fields[] = array( 'id' => 'force_reset_passwords',