Warning: This method has been deprecated.
LLMS_AJAX::get_students()
Return array of students
Description Description
Return Return
(array)
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(); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | This method has been deprecated. |
?? | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: