I need to look up a user id by the email address they created their account with. Normally I would use:
<?php $user_ID = get_current_user_id(); ?>
But in this case, the user has not been signed in yet.
Found a quick way to do it:
$user = get_user_by( 'email', '[email protected]' );
$userId = $user->ID;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With