UM_USERLOGSIN::um_user_login( $um_args )

Validation function when the trigger action is hit


Parameters Parameters

$um_args

(Required)


Source Source

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

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

		if ( function_exists( 'um_user' ) ) {
			$user_id = um_user( 'ID' );
		} else {
			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;
	}