BP_USERUPDATEAVATAR::bp_user_updated_avatar( $item_id,  $type,  $avatar_data )

Validation function when the trigger action is hit


Parameters Parameters

$user_id

(Required)

$posted_field_ids

(Required)

$errors

(Required)

$old_values

(Required)

$new_values

(Required)


Source Source

File: src/integrations/buddypress/triggers/bp-userupdateavatar.php

	public function bp_user_updated_avatar( $item_id, $type, $avatar_data ) {



		if ( empty( $avatar_data ) || 'user' !== $avatar_data['object'] ) {
			return;
		}

		$args = [
			'code'           => $this->trigger_code,
			'meta'           => $this->trigger_meta,
			'user_id'        => $avatar_data['item_id'],
			'ignore_post_id' => true,
			'is_signed_in'   => true,
		];

		Automator()->maybe_add_trigger_entry( $args );
	}