GP_AWARDACHIEVEMENT_A::award_an_achievement( $user_id,  $action_data,  $recipe_id )

Validation function when the trigger action is hit


Parameters Parameters

$user_id

(Required)

$action_data

(Required)

$recipe_id

(Required)


Source Source

File: src/integrations/gamipress/actions/gp-awardachievement-a.php

	public function award_an_achievement( $user_id, $action_data, $recipe_id ) {



		$achievement_id = $action_data['meta'][ $this->action_meta ];
		gamipress_award_achievement_to_user( absint( $achievement_id ), absint( $user_id ), get_current_user_id() );

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