This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BP_Members_Admin::member_can_edit( int $user_id )
Can the current user edit the one displayed.
Description
Self profile editing / or bp_moderate check. This might be replaced by more granular capabilities in the future.
Parameters
- $user_id
-
(Required) ID of the user being checked for edit ability.
Return
(bool)
Source
File: bp-members/classes/class-bp-members-admin.php
private function member_can_edit( $user_id = 0 ) { $retval = false; // Bail if no user ID was passed. if ( empty( $user_id ) ) { return $retval; } // Member can edit if they are viewing their own profile. if ( $this->current_user_id === $user_id ) { $retval = true; // Trust the 'bp_moderate' capability. } else { $retval = bp_current_user_can( 'bp_moderate' ); } return $retval; }
Changelog
Version | Description |
---|---|
BuddyPress 2.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.