Alert: 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 Description

Self profile editing / or bp_moderate check. This might be replaced by more granular capabilities in the future.


Parameters Parameters

$user_id

(Required) ID of the user being checked for edit ability.


Top ↑

Return Return

(bool)


Top ↑

Source 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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.