UM_USERREGISTER::um_user_register_with_form( $user_id,  $um_args )

Validation function when the trigger action is hit


Parameters Parameters

$user_id

(Required)

$um_args

(Required)


Source Source

File: src/integrations/ultimate-member/triggers/um-userregister.php

	public function um_user_register_with_form( $user_id, $um_args ) {

		if ( ! isset( $um_args['form_id'] ) ) {
			return;
		}



		$args = [
			'code'         => $this->trigger_code,
			'meta'         => $this->trigger_meta,
			'post_id'      => absint( $um_args['form_id'] ),
			'user_id'      => absint( $user_id ),
			'is_signed_in' => true,
		];

		if ( isset( Automator()->process ) && isset( Automator()->process->user ) && Automator()->process->user instanceof Automator_Recipe_Process_User ) {
			Automator()->process->user->maybe_add_trigger_entry( $args );
		} else {
			Automator()->maybe_add_trigger_entry( $args );
		}

		return;
	}