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.

Top ↑

Parameters Parameters


(string|null) (Optional) An email address, if available.

Default value: null

Top ↑

Return Return

(null|integer) Returns the WP_User ID or null if not found.

Top ↑

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;


Top ↑

Changelog Changelog

Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.