[wp-trac] [WordPress Trac] #61107: 'Change role to...' field on wp-admin/network/site-users.php?id=xxx is populated by wrong site roles

WordPress Trac noreply at wordpress.org
Tue Apr 30 21:15:01 UTC 2024


#61107: 'Change role to...' field on wp-admin/network/site-users.php?id=xxx is
populated by wrong site roles
---------------------------+-----------------------------
 Reporter:  ignatiusjeroe  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  General        |    Version:
 Severity:  normal         |   Keywords:
  Focuses:  multisite      |
---------------------------+-----------------------------
 Please see images for bug details

 **The solutions**
 Replace line 314 in file wp-admin/includes/class-wp-users-list-table.php
 with:

 {{{#!php
 <?php
 <?php
             if ( $this->is_site_users ) {
                 switch_to_blog( $this->site_id );
                 wp_dropdown_roles();
                 restore_current_blog();
             } else {
                 wp_dropdown_roles();
             }
             ?>
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61107>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list