Buddypress how to create a group programmatically in PHP (and add users)

In this post I’ll show you how to¬†create a new group in PHP and then add users to the group. In this example I’m adding new users to a new group when they register.

So there you go, adding users to groups in Buddypress.