BP_REST_Groups_Endpoint::can_user_delete_or_update( BP_Groups_Group $group )

See if user can delete or update a group.

Description

Parameters

$group

(Required) Group item.

Return

(bool)

Source

File: bp-groups/classes/class-bp-rest-groups-endpoint.php

	public function can_user_delete_or_update( $group ) {
		return ( bp_current_user_can( 'bp_moderate' ) || bp_loggedin_user_id() === $group->creator_id );
	}

Changelog

Changelog
Version Description
0.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.