From 1dbf6d7bec06b99b450d1367d0cad83cd042e385 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 4 Apr 2023 21:00:07 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-admin/users.php`. Follow-up to [10990], [11162], [11217], [37059], [55592]. Props moinrrahmed. Fixes #58056. git-svn-id: https://develop.svn.wordpress.org/trunk@55622 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php index 82abb1dc40..e15c99e8ef 100644 --- a/src/wp-admin/users.php +++ b/src/wp-admin/users.php @@ -145,7 +145,7 @@ switch ( $wp_list_table->current_action() ) { } // The new role of the current user must also have the promote_users cap or be a multisite super admin. - if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $role ]->has_cap( 'promote_users' ) + if ( $id === $current_user->ID && ! $wp_roles->role_objects[ $role ]->has_cap( 'promote_users' ) && ! ( is_multisite() && current_user_can( 'manage_network_users' ) ) ) { $update = 'err_admin_role'; continue;