Autonami_Helpers::get_wp_id( mixed $contact )

Method get_wp_id


Parameters Parameters

$contact

(Required)


Top ↑

Return Return

(mixed)


Source Source

File: src/integrations/autonami/helpers/autonami-helpers.php

	public function get_wp_id( $contact ) {

		$email = $contact->contact->get_email();

		$user = get_user_by( 'email', $email );

		if ( false === $user ) {
			throw new \Exception( __( 'WP user not found', 'uncanny-automator' ) );
		}

		return $user->ID;

	}