[wp-trac] [WordPress Trac] #61100: 'Change role' field on wp-admin/network/site-users.php?id=xxx contains a bug

WordPress Trac noreply at wordpress.org
Tue Apr 30 14:36:01 UTC 2024


#61100: 'Change role' field on wp-admin/network/site-users.php?id=xxx contains a
bug
--------------------------------+-----------------------------
 Reporter:  ignatiusjeroe       |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 when selecting the option '-No role for this site-' on page wp-
 admin/network/site-users.php?id=xxx triggers an error. This should not be
 the case. This field is also available on wp-admin/users.php but this
 doesnt trigger an error.

 **Bug**
 See wp-admin/network/site-users.php @ line 140-183. This case 'promote'
 handles this request. The issue is the value='''none''' of '-No role for
 this site-', which is not found in $edible_roles. The if-statement on line
 145 will cause the error.

 **Solution**
 The case 'promote' of wp-admin/users.php @ line 110-170 is almost
 identical to that of wp-admin/network/site-users.php?id=xxx. But this
 statement took the 'none' value into account.
 wp-admin/network/site-users.php line 145 - 147 should be replaced by wp-
 admin/users.php lines 125-136

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


More information about the wp-trac mailing list