LLMS_Student::is_active()

Determine if the student is active in at least one course or membership


Description Description


Return Return

(boolean)


Top ↑

Source Source

File: includes/models/model.llms.student.php

	public function is_active() {

		// this is a simpler, faster query, check first
		if ( $this->get_membership_levels() ) {
			return true;
		}

		// check for at least one enrolled course
		$courses = $this->get_courses( array(
			'limit'   => 1,
			'status'  => 'enrolled',
		) );

		if ( $courses['results'] ) {
			return true;
		}

		// not active
		return false;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.14.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: