Hooks::groupMemberDeleted( $user_id, $group_id )
Hook on user group deleted.
Description
Parameters
- $user_id
-
(Required)
- $group_id
-
(Required)
Source
File: bp-integrations/learndash/buddypress/Hooks.php
public function groupMemberDeleted( $user_id, $group_id ) {
$groupId = $group_id;
$memberId = $user_id;
$group = groups_get_group( $groupId );
if ( $group->is_admin ) {
/**
*
* Fires when Social Group Organizer is removed.
*
* @param int $groupId group id
* @param int $memberId member id
* @param object $group group object
*
* @since BuddyBoss 1.4.7
*/
return do_action( 'bp_ld_sync/buddypress_group_admin_removed', $groupId, $memberId, $group );
}
if ( $group->is_mod ) {
/**
*
* Fires when Social Group Moderator is removed.
*
* @param int $groupId group id
* @param int $memberId member id
* @param object $group group object
*
* @since BuddyBoss 1.4.7
*/
return do_action( 'bp_ld_sync/buddypress_group_mod_removed', $groupId, $memberId, $group );
}
return do_action( 'bp_ld_sync/buddypress_group_member_removed', $groupId, $memberId, $group );
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.4.7 | 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.