SyncGenerator::syncLdUser( $userId, $remove = false )
Sync a ld student to bp
Description
Source
File: bp-integrations/learndash/library/SyncGenerator.php
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | public function syncLdUser( $userId , $remove = false) { $ldGroupAdmins = learndash_get_groups_administrator_ids( $this ->ldGroupid); // if this user is learndash leader, we don't want to downgrad them (bp only allow 1 user) if (in_array( $userId , $ldGroupAdmins )) { return $this ; } $this ->syncingToBuddypress( function () use ( $userId , $remove ) { $this ->addUserToBpGroup( $userId , 'user' , $remove ); }); 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.