Version Description
Download this release
Release Info
Developer | shinephp |
Plugin | User Role Editor |
Version | 4.63.1 |
Comparing to | |
See all releases |
Code changes from version 4.63 to 4.63.1
- includes/classes/base-lib.php +4 -1
- includes/classes/user-role-editor.php +9 -4
- readme.txt +13 -8
- user-role-editor.php +2 -2
includes/classes/base-lib.php
CHANGED
@@ -88,7 +88,7 @@ class URE_Base_Lib {
|
|
88 |
protected function init_options( $options_id ) {
|
89 |
|
90 |
$this->options_id = $options_id;
|
91 |
-
$this->options = get_option( $options_id );
|
92 |
|
93 |
}
|
94 |
// end of init_options()
|
@@ -209,6 +209,9 @@ class URE_Base_Lib {
|
|
209 |
*/
|
210 |
public function put_option( $option_name, $option_value, $flush_options = false ) {
|
211 |
|
|
|
|
|
|
|
212 |
$this->options[$option_name] = $option_value;
|
213 |
if ( $flush_options ) {
|
214 |
$this->flush_options();
|
88 |
protected function init_options( $options_id ) {
|
89 |
|
90 |
$this->options_id = $options_id;
|
91 |
+
$this->options = get_option( $options_id, array() );
|
92 |
|
93 |
}
|
94 |
// end of init_options()
|
209 |
*/
|
210 |
public function put_option( $option_name, $option_value, $flush_options = false ) {
|
211 |
|
212 |
+
if ( !is_array( $this->options ) ) {
|
213 |
+
$this->options = array();
|
214 |
+
}
|
215 |
$this->options[$option_name] = $option_value;
|
216 |
if ( $flush_options ) {
|
217 |
$this->flush_options();
|
includes/classes/user-role-editor.php
CHANGED
@@ -365,11 +365,16 @@ class User_Role_Editor {
|
|
365 |
return;
|
366 |
}
|
367 |
|
|
|
|
|
|
|
|
|
|
|
368 |
// editing a user profile: it's correct to call is_super_admin() directly here, as permissions are raised for the $current_user only
|
369 |
-
if (!$this->lib->is_super_admin($current_user_id) && is_super_admin($profileuser->ID)) { // trying to edit a superadmin while himself is less than a superadmin
|
370 |
-
wp_die(esc_html__('You do not have permission to edit this user.', 'user-role-editor'));
|
371 |
-
} elseif (!( is_user_member_of_blog($profileuser->ID,
|
372 |
-
wp_die(esc_html__('You do not have permission to edit this user.', 'user-role-editor'));
|
373 |
}
|
374 |
|
375 |
}
|
365 |
return;
|
366 |
}
|
367 |
|
368 |
+
if ( !isset( $profileuser->ID ) ) {
|
369 |
+
return;
|
370 |
+
}
|
371 |
+
|
372 |
+
$current_blog_id = get_current_blog_id();
|
373 |
// editing a user profile: it's correct to call is_super_admin() directly here, as permissions are raised for the $current_user only
|
374 |
+
if ( !$this->lib->is_super_admin( $current_user_id ) && is_super_admin( $profileuser->ID ) ) { // trying to edit a superadmin while himself is less than a superadmin
|
375 |
+
wp_die( esc_html__('You do not have permission to edit this user.', 'user-role-editor') );
|
376 |
+
} elseif ( !( is_user_member_of_blog( $profileuser->ID, $current_blog_id ) && is_user_member_of_blog( $current_user_id, $current_blog_id ) ) ) { // editing user and edited user aren't members of the same blog
|
377 |
+
wp_die( esc_html__('You do not have permission to edit this user.', 'user-role-editor') );
|
378 |
}
|
379 |
|
380 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: shinephp
|
3 |
Tags: user, role, editor, security, access, permission, capability
|
4 |
Requires at least: 4.4
|
5 |
-
Tested up to: 6.
|
6 |
-
Stable tag: 4.63
|
7 |
Requires PHP: 7.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -21,7 +21,7 @@ Capabilities could be assigned on per user basis. Multiple roles could be assign
|
|
21 |
You can add new capabilities and remove unnecessary capabilities which could be left from uninstalled plugins.
|
22 |
Multi-site support is provided.
|
23 |
|
24 |
-
Try it out on your free TasteWP [test site](https://demo.tastewp.com/user-role-editor)
|
25 |
|
26 |
To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/) at [shinephp.com](http://shinephp.com)
|
27 |
|
@@ -82,8 +82,13 @@ https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
|
|
82 |
|
83 |
== Changelog =
|
84 |
|
|
|
|
|
|
|
|
|
|
|
85 |
= [4.63] 11.07.2022 =
|
86 |
-
* Update: Marked as compatible with WordPress 6.1
|
87 |
* Update: Few notices (e.g. "Constant FILTER_SANITIZE_STRING is deprecated") was fixed for better compatibility with PHP 8.1.
|
88 |
* Update: URE does not try to deactivate itself in case another instance is active, just shows notice and stops execution.
|
89 |
|
@@ -104,10 +109,10 @@ I am ready to answer on your questions about plugin usage. Use [plugin page comm
|
|
104 |
|
105 |
== Upgrade Notice ==
|
106 |
|
107 |
-
= [4.63]
|
108 |
-
*
|
109 |
-
*
|
110 |
-
*
|
111 |
|
112 |
|
113 |
|
2 |
Contributors: shinephp
|
3 |
Tags: user, role, editor, security, access, permission, capability
|
4 |
Requires at least: 4.4
|
5 |
+
Tested up to: 6.1
|
6 |
+
Stable tag: 4.63.1
|
7 |
Requires PHP: 7.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
21 |
You can add new capabilities and remove unnecessary capabilities which could be left from uninstalled plugins.
|
22 |
Multi-site support is provided.
|
23 |
|
24 |
+
Try it out on your free TasteWP [test site](https://demo.tastewp.com/user-role-editor).
|
25 |
|
26 |
To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/) at [shinephp.com](http://shinephp.com)
|
27 |
|
82 |
|
83 |
== Changelog =
|
84 |
|
85 |
+
= [4.63.1] 20.09.2022 =
|
86 |
+
* Marked as compatible with WordPress version 6.0.2
|
87 |
+
* Fix: PHP Warning: Attempt to read property “ID” on null in /wp-content/plugins/user-role-editor/includes/classes/user-role-editor.php on line 369
|
88 |
+
* Fix: Deprecated: Automatic conversion of false to array is deprecated in ./includes/classes/base-lib.php on line 212
|
89 |
+
|
90 |
= [4.63] 11.07.2022 =
|
91 |
+
* Update: Marked as compatible with WordPress 6.0.1
|
92 |
* Update: Few notices (e.g. "Constant FILTER_SANITIZE_STRING is deprecated") was fixed for better compatibility with PHP 8.1.
|
93 |
* Update: URE does not try to deactivate itself in case another instance is active, just shows notice and stops execution.
|
94 |
|
109 |
|
110 |
== Upgrade Notice ==
|
111 |
|
112 |
+
= [4.63.1] 19.09.2022 =
|
113 |
+
* Marked as compatible with WordPress version 6.0.2
|
114 |
+
* Fix: PHP Warning: Attempt to read property “ID” on null in /wp-content/plugins/user-role-editor/includes/classes/user-role-editor.php on line 369
|
115 |
+
* Fix: Deprecated: Automatic conversion of false to array is deprecated in ./includes/classes/base-lib.php on line 212
|
116 |
|
117 |
|
118 |
|
user-role-editor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: User Role Editor
|
4 |
Plugin URI: https://www.role-editor.com
|
5 |
Description: Change/add/delete WordPress user roles and capabilities.
|
6 |
-
Version: 4.63
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: https://www.role-editor.com
|
9 |
Text Domain: user-role-editor
|
@@ -29,7 +29,7 @@ if ( defined( 'URE_VERSION' ) ) {
|
|
29 |
return;
|
30 |
}
|
31 |
|
32 |
-
define( 'URE_VERSION', '4.63' );
|
33 |
define( 'URE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
34 |
define( 'URE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
35 |
define( 'URE_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
|
3 |
Plugin Name: User Role Editor
|
4 |
Plugin URI: https://www.role-editor.com
|
5 |
Description: Change/add/delete WordPress user roles and capabilities.
|
6 |
+
Version: 4.63.1
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: https://www.role-editor.com
|
9 |
Text Domain: user-role-editor
|
29 |
return;
|
30 |
}
|
31 |
|
32 |
+
define( 'URE_VERSION', '4.63.1' );
|
33 |
define( 'URE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
34 |
define( 'URE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
35 |
define( 'URE_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
|