Hooks::groupMemberAdded( $groupMemberObject )

Sub action when a member is added to bp group, based on type

Description

Source

File: bp-integrations/learndash/buddypress/Hooks.php

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
public function groupMemberAdded($groupMemberObject)
{
    if (! $groupMemberObject->is_confirmed) {
        return false;
    }
 
    $groupId = $groupMemberObject->group_id;
    $memberId = $groupMemberObject->user_id;
 
    if ($groupMemberObject->is_banned) {
        return do_action('bp_ld_sync/buddypress_group_member_banned', $groupId, $memberId, $groupMemberObject);
    }
 
    if ($groupMemberObject->is_admin) {
        return do_action('bp_ld_sync/buddypress_group_admin_added', $groupId, $memberId, $groupMemberObject);
    }
 
    if ($groupMemberObject->is_mod) {
        return do_action('bp_ld_sync/buddypress_group_mod_added', $groupId, $memberId, $groupMemberObject);
    }
 
    return do_action('bp_ld_sync/buddypress_group_member_added', $groupId, $memberId, $groupMemberObject);
}

Changelog

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