BDB_ADDTOGROUP::add_to_bb_group( $user_id,  $action_data,  $recipe_id,  $args )

Validation function when the action is hit


Parameters Parameters

$user_id

(Required)

$action_data

(Required)

$recipe_id

(Required)


Source Source

File: src/integrations/buddyboss/actions/bdb-addtogroup.php

	public function add_to_bb_group( $user_id, $action_data, $recipe_id, $args ) {



		$add_to_bp_group = $action_data['meta'][ $this->action_meta ];

		if ( function_exists( 'groups_join_group' ) ) {
			groups_join_group( $add_to_bp_group, $user_id );

			Automator()->complete_action( $user_id, $action_data, $recipe_id );
		} else {
			Automator()->complete_action( $user_id, $action_data, $recipe_id, __( ' groups_join_group Function does not exist.' ) );
		}

	}