[buddypress-dev] [BuddyPress] How to programmatically add an user to a group
Stas Sușcov
stas at nerd.ro
Mon Jun 27 10:50:28 UTC 2011
În data de Lu, 27-06-2011 la 09:12 +0200, Pasquale Puzio a scris:
> Hi friends,
>
> I would know if in BuddyPress there is some function or some plugin
> that allow me to automatically add an user to a group. I need that
> because it's an important function of my work-flow.
>
> If there aren't, could someone post here a sample code to do that?
>
> Thanks
Hey,
you should take a look at `groups_join_group()` and
`groups_leave_group()`
Here's a snippet that should help you:
http://chopapp.com/#yqf6vusa
More information about the buddypress-dev
mailing list