MYCRED_AWARDBADGE_A::award_mycred_badge( $user_id,  $action_data,  $recipe_id,  $args )

Validation function when the trigger action is hit


Parameters Parameters

$user_id

(Required)

$action_data

(Required)

$recipe_id

(Required)


Source Source

File: src/integrations/mycred/actions/mycred-awardbadge-a.php

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



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

		mycred_assign_badge_to_user( absint( $user_id ), absint( $badge_id ) );

		Automator()->complete_action( $user_id, $action_data, $recipe_id );
	}