WPF_USERREPUTATION::set_reputation( $user_id,  $action_data,  $recipe_id )


Parameters Parameters

$user_id

(Required)

$action_data

(Required)

$recipe_id

(Required)


Source Source

File: src/integrations/wpforo/actions/wpf-userreputation.php

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



		$reputation_id = absint( str_replace( "L", "", $action_data['meta'][ $this->action_meta ] ) );
		$points        = WPF()->member->rating( $reputation_id, 'points' );

		$args = array( 'rank' => $points );
		WPF()->member->update_profile_fields( $user_id, $args, false );
		WPF()->member->reset( $user_id );

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