SyncGenerator::syncBpMember( $userId, $remove = false, $clearCache = true )
Sync a bp member to ld
Description
Source
File: bp-integrations/learndash/library/SyncGenerator.php
public function syncBpMember($userId, $remove = false, $clearCache = true)
{
$this->syncingToLearndash(function() use ($userId, $remove) {
call_user_func_array($this->getBpSyncFunction('user'), [$userId, $this->ldGroupId, $remove]);
// if sync to user, we need to remove previous admin
if ('user' == $this->getBpSyncToRole('user')) {
call_user_func_array('ld_update_leader_group_access', [$userId, $this->ldGroupId, true]);
}
});
if ($clearCache) {
$this->clearLdGroupCache();
}
return $this;
}
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.