LLMS_Admin_Users_Table::modify_query_args( array $args )

Modify the query arguments of the users table query.


Description Description

If the current user is an instructor and no role argument is provided will limit the query to users with the instructors_assistant and instructor roles.


Top ↑

Parameters Parameters

$args

(array) (Required) Array of arguments to be passed to a WP_User_Query.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/admin/class-llms-admin-users-table.php

	public function modify_query_args( $args ) {

		if ( LLMS_User_Permissions::is_current_user_instructor() && empty( $args['role'] ) ) {
			$args['role__in'] = array( 'instructors_assistant', 'instructor' );
		}

		return $args;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.34.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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