sfwd_lms_has_access( int $post_id, int|null $user_id = null )
Checks whether a user has access to a course.
Description #
Parameters #
- $post_id
-
(int) (Required) ID of the resource.
- $user_id
-
(int|null) (Optional) ID of the user.
Default value: null
Return #
(bool) Returns true if the user has access.
Source #
Changelog #
Version | Description |
---|---|
2.1.0 | Introduced. |
Related #
Namespace #
@package #
Uses #
Uses | Description |
---|---|
includes/course/ld-course-user-functions.php: sfwd_lms_has_access_fn () |
Checks whether a user has access to a course. |
includes/course/ld-course-user-functions.php: sfwd_lms_has_access |
Filters whether a user has access to the course. |
Used By #
Used By | Description |
---|---|
src/Core/Models/Product.php: Product::user_has_access () |
Returns true if a user has access to this product, false otherwise. |
themes/ld30/includes/helpers.php: learndash_get_course_step_attributes () |
Gets the course step attributes. |
includes/ld-users.php: learndash_user_course_complete_all_steps () |
Mark all course steps as complete for a user. |
includes/shortcodes/ld_infobar.php: learndash_infobar_shortcode () |
Builds the |
includes/shortcodes/ld_quiz.php: learndash_quiz_shortcode_function () |
Builds the |
includes/exam/ld-exam-functions.php: learndash_course_exam_challenge_redirect () |
Redirect the user to the associate challenge exam from the course. |
includes/classes/class-ldlms-model-exam.php: LDLMS_Model_Exam::set_course_complete () |
Set the Exam Course as completed if the Exam was passed. |
includes/payments/ld-login-registration-functions.php: learndash_registration_output () |
LearnDash LD30 Shows registration form for user registration |
includes/rest-api/v2/class-ld-rest-lessons-controller.php: LD_REST_Lessons_Controller_V2::get_item_permissions_check () |
Check user permission to get/access single Lesson. |
includes/rest-api/v2/class-ld-rest-lessons-controller.php: LD_REST_Lessons_Controller_V2::get_items_permissions_check () |
Check user permission to get/access Lessons. |
includes/rest-api/v2/class-ld-rest-essays-controller.php: LD_REST_Essays_Controller_V2::get_item_permissions_check () |
Check user permission to get/access single item. |
includes/rest-api/v2/class-ld-rest-quizzes-controller.php: LD_REST_Quizzes_Controller_V2::get_item_permissions_check () |
Check user permission to get/access single Quiz. |
includes/rest-api/v2/class-ld-rest-quizzes-controller.php: LD_REST_Quizzes_Controller_V2::get_items_permissions_check () |
Check user permission to get/access Quizzes. |
includes/rest-api/v2/class-ld-rest-topics-controller.php: LD_REST_Topics_Controller_V2::get_item_permissions_check () |
Check user permission to get/access single Topic. |
includes/rest-api/v2/class-ld-rest-topics-controller.php: LD_REST_Topics_Controller_V2::get_items_permissions_check () |
Check user permission to get/access Lessons. |
includes/rest-api/v2/class-ld-rest-assignments-controller.php: LD_REST_Assignments_Controller_V2::get_item_permissions_check () |
Check user permission to get/access single Lesson. |
includes/rest-api/v2/class-ld-rest-questions-controller.php: LD_REST_Questions_Controller_V2::get_items_permissions_check () |
Check user permission to get/access Quizzes. |
src/deprecated/LearnDash_PayPal_IPN.php: LearnDash_PayPal_IPN::ipn_grant_access () |
Grant user access. |
themes/ld30/includes/helpers.php: learndash_30_ajax_pager () |
Gets the ld30 theme ajax pagination. |
includes/class-ld-lms.php: SFWD_LMS::course_progress_data () |
Course progress data |
includes/class-ld-cpt-instance.php: SFWD_CPT_Instance::get_archive_content () |
Get Archive content |
includes/class-ld-cpt-instance.php: SFWD_CPT_Instance::template_content () |
Generate output for courses, lessons, topics, quizzes Filter callback for ‘the_content’ (wp core filter) |
includes/shortcodes/ld_course_resume.php: ld_course_resume_shortcode () |
Builds the |
includes/rest-api/v1/class-ld-rest-lessons-controller.php: LD_REST_Lessons_Controller_V1::get_item_permissions_check () |
Check Single Lesson Read Permissions. |
includes/rest-api/v1/class-ld-rest-lessons-controller.php: LD_REST_Lessons_Controller_V1::get_items_permissions_check () |
Check Lessons Read Permissions. |
includes/rest-api/v1/class-ld-rest-quizzes-controller.php: LD_REST_Quizzes_Controller_V1::get_item_permissions_check () |
Check Single Quiz Read Permissions. |
includes/rest-api/v1/class-ld-rest-quizzes-controller.php: LD_REST_Quizzes_Controller_V1::get_items_permissions_check () |
Check if a given request has access manage the item. |
includes/rest-api/v1/class-ld-rest-topics-controller.php: LD_REST_Topics_Controller_V1::get_item_permissions_check () |
Check Single Topic Read Permissions. |
includes/rest-api/v1/class-ld-rest-topics-controller.php: LD_REST_Topics_Controller_V1::get_items_permissions_check () |
Check Topics Read Permissions. |
includes/course/ld-course-functions.php: learndash_process_course_join () |
Handles the actions to be made when the user joins a course. |
includes/shortcodes/ld_course_content.php: learndash_course_content_shortcode () |
Builds the |
includes/course/ld-course-user-functions.php: sfwd_lms_access_redirect () |
Redirects a user to the course page if it does not have access. |
includes/course/ld-course-user-functions.php: ld_course_access_expired_alert () |
Generates an alert in the header that a user’s access to the course is expired. |
includes/course/ld-course-progress.php: learndash_mark_complete () |
Outputs the HTML output to mark a course complete. |
includes/shortcodes/ld_course_expire_status.php: learndash_course_expire_status_shortcode () |
Builds the |
includes/course/ld-course-user-functions.php: ld_course_check_user_access () |
Checks if the user has access to a course. |
includes/shortcodes/ld_course_list.php: learndash_course_status_content_shortcode () |
Generates the output for course status shortcodes. |
includes/shortcodes/ld_student.php: learndash_student_check_shortcode () |
Builds the |
includes/shortcodes/ld_visitor.php: learndash_visitor_check_shortcode () |
Builds the |