[buddypress-trac] [BuddyPress Trac] #8069: typo 'edit_user' in class-bp-members.php

buddypress-trac noreply at wordpress.org
Fri Mar 22 15:18:18 UTC 2019


#8069: typo 'edit_user' in class-bp-members.php
--------------------------+----------------------
 Reporter:  Venutius      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Members       |     Version:
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |
--------------------------+----------------------
Changes (by johnjamesjacoby):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 This is not a typo, and is working as intended.

 `edit_user` with a user ID passed into it is valid.

 See: https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-
 includes/capabilities.php#L47

 In general, the singular version of a capability check is for asking the
 question: can the current user perform this action on this single
 identifiable thing?

 The plural version of a capability check is for asking the question: can
 the current user perform this action on all of this kind of thing?

 Ultimately, what I suspect is happening in your case, is that some other
 capability check is saying "no", that the current user is still not
 allowed to edit the user being compared against, despite it having the
 `bp_moderate` capability and the `edit_users` capability.

 As a guess, a multisite installation might require an additional
 `manage_network_users` capability, or some other specific override.

 I've written a plugin (a few years ago) to allow site Administrators to
 edit users of their sites in a multisite environment. You might find it to
 be a good start to help you make things work how you want.

 See: https://jjj.codes/stuttter/wp-user-edit

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8069#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list