LLMS_REST_Students_Controller::check_read_item_permissions( int $item_id )

Determine if the current user can view the requested student.


Parameters Parameters

$item_id

(int) (Required) WP_User id.


Top ↑

Return Return

(bool)


Top ↑

Source Source

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

	protected function check_read_item_permissions( $item_id ) {

		if ( get_current_user_id() === $item_id ) {
			return true;
		}

		return current_user_can( 'view_students', $item_id );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
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.