Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Order_Generator::find_user_id( string|null $email = null )
Attempts to locate a user ID.
Description Description
Uses the logged in user’s information and falls back to a lookup by email address if available.
Parameters Parameters
-
(string|null) (Optional) An email address, if available.
Default value: null
Return Return
(null|integer) Returns the WP_User ID or null if not found.
Source Source
File: includes/class-llms-order-generator.php
private function find_user_id( $email = null ) { if ( is_user_logged_in() ) { return get_current_user_id(); } if ( $email ) { $user = get_user_by( 'email', $email ); return $user ? $user->ID : null; } return null; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
7.0.0 | Introduced. |