dozent_has_course_access( null|int|object $course = null, null|int|object $user = null )
Check if any user has access to specific course
Description
Example usage:
$bool = dozent_has_course_access( $course, $user );
See also
Parameters
- $course
-
(null|int|object) (Optional) Course Object or ID
Default value: null
- $user
-
(null|int|object) (Optional) User Object or ID
Default value: null
Return
(bool)
Source
File: includes/course-functions.php
function dozent_has_course_access( $course = null, $user = null ) { $course = dozent_get_course( $course ); /** * Filter course access * * @since DozentLMS 1.0.0 * * @param bool $course ->has_permission() Course has permission * @param object $course Course Object * @param int|object $user User Object OR ID */ return (bool) apply_filters( 'dozent_has_course_access', $course->has_permission( $user ), $course, $user ); }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |