Autonami_Helpers::get_wp_id( mixed $contact )
Method get_wp_id
Contents
Parameters Parameters
- $contact
-
(Required)
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; }
Expand full source code Collapse full source code View on Github