LLMS_REST_Instructors_Controller::get_items_permissions_check( WP_REST_Request $request )

Determine if current user has permission to list users.


Parameters Parameters

$request

(WP_REST_Request) (Required) Request object.


Top ↑

Return Return

(true|WP_Error)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/class-llms-rest-instructors-controller.php

	public function get_items_permissions_check( $request ) {

		if ( ! current_user_can( 'list_users' ) ) {
			return llms_rest_authorization_required_error( __( 'You are not allowed to list instructors.', 'lifterlms' ) );
		}

		return true;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.13 Fixed authentication error message referring to 'students' rather than 'instructors'.
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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