llms_get_student( mixed $user = null, bool $autoload = true )

Get an LLMS_Student.


Parameters Parameters

$user

(mixed) (Optional) WP_User ID, instance of WP_User, or instance of any student class extending this class.

Default value: null

$autoload

(bool) (Optional) If true and $user input is empty, the user will be loaded from get_current_user_id().<br> If $user is not empty then this parameter has no impact.

Default value: true


Top ↑

Return Return

(LLMS_Student|false) LLMS_Student instance on success, false if user not found.


Top ↑

Source Source

File: includes/functions/llms.functions.person.php

function llms_get_student( $user = null, $autoload = true ) {
	$student = new LLMS_Student( $user, $autoload );
	return $student->exists() ? $student : false;
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.1.0 Added the $autoload parameter.
3.9.0 Unknown
3.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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