To use the groups function, you must activate the buddypress groups component.