Warning: This method has been deprecated.

LLMS_AJAX::get_students()

Return array of students


Description Description


Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.ajax.php

	public function get_students() {

		llms_deprecated_function( 'LLMS_AJAX::get_students()', '3.13.0' );

		$term = array_key_exists( 'term', $_REQUEST ) ? $_REQUEST['term'] : '';

		$user_args = array(
				'include'      => array(),
				'orderby'      => 'display_name',
				'order'        => 'ASC',
				'count_total'  => false,
				'fields'       => 'all',
				'search'       => $term . '*',
				'exclude'      => $this->get_enrolled_students_ids(),
				'number'       => 30,
		);
		$all_users = get_users( $user_args );

		$users_arr = array();

		foreach ( $all_users as $user ) {
			$temp['id'] = $user->ID;
			$temp['name'] = $user->display_name . ' (' . $user->user_email . ')';
			$users_arr[] = $temp;
		}

		echo json_encode( array(
			'success' => true,
			'items' => $users_arr,
		) );

		wp_die();
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.13.0 This method has been deprecated.
?? Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: