learndash_get_users_group_ids( int $user_id, boolean $bypass_transient = false )
Get a users group IDs.
Description #
Parameters #
- $user_id
-
(int) (Optional) User ID. Default 0.
- $bypass_transient
-
(boolean) (Optional) Whether to bypass transient cache or not.
Default value: false
Return #
(array) A list of user's group IDs.
Source #
File: includes/ld-groups.php
Changelog #
Version | Description |
---|---|
2.1.0 | Introduced. |
Related #
Namespace #
@package #
Uses #
Uses | Description |
---|---|
includes/ld-groups.php: learndash_is_groups_hierarchical_enabled () |
Utility function to check if Groups post type is hierarchical. |
includes/ld-groups.php: learndash_validate_groups () |
Validate an array of Group post IDs. |
includes/ld-groups.php: learndash_get_group_children () |
Utility function to return all groups below the parent. |
includes/class-ldlms-transients.php: LDLMS_Transients::get () |
Get a Transient |
includes/class-ldlms-transients.php: LDLMS_Transients::set () |
Utility function to interface with WP set_transient function. This function allow for filtering if to actually write the transient. |
includes/ld-groups.php: learndash_is_group_leader_user () |
Checks if a user has the group leader capabilities. |
includes/ld-groups.php: learndash_get_administrators_group_ids () |
Gets the list of group IDs administered by the user. |
includes/settings/class-ld-settings-sections.php: LearnDash_Settings_Section::get_section_setting () |
Static function to get a Section Setting value. |
Used By #
Used By | Description |
---|---|
includes/ld-groups.php: learndash_check_group_leader_course_user_intersect () |
Check if the Group Leader AND User and Course have common Groups. |
includes/rest-api/v2/class-ld-rest-users-course-progress-controller.php: LD_REST_Users_Course_Progress_Controller_V2::check_request_params () |
Common function to check and set request params used by the endpoints. |
includes/rest-api/v2/class-ld-rest-users-course-progress-controller.php: LD_REST_Users_Course_Progress_Controller_V2::get_request_courses () |
Common function to get the displayable Courses. |
includes/rest-api/v2/class-ld-rest-users-quiz-progress-controller.php: LD_REST_Users_Quiz_Progress_Controller_V2::get_items () |
Get user course progress. |
includes/rest-api/v2/class-ld-rest-essays-controller.php: LD_REST_Essays_Controller_V2::rest_query_filter () |
Filter essays query args. |
includes/rest-api/v2/class-ld-rest-users-groups-controller.php: LD_REST_Users_Groups_Controller_V2::rest_query_filter () |
Filter Users Groups query args. |
includes/rest-api/v2/class-ld-rest-assignments-controller.php: LD_REST_Assignments_Controller_V2::rest_query_filter () |
Filter Assignments query args. |
includes/admin/classes-posts-listings/class-learndash-admin-groups-listing.php: Learndash_Admin_Groups_Listing::listing_table_query_vars_filter_groups () |
Listing table query vars |
includes/admin/classes-posts-listings/class-learndash-admin-users-listing.php: Learndash_Admin_Users_Listing::show_column_user_groups_courses () |
Show the User Courses column. |
includes/ld-groups.php: learndash_update_group_course_user_progress () |
Update Group User Course progress. |
includes/group/ld-groups-membership.php: LD_Groups_Membership::is_user_in_post_groups () |
Check if user if in the associated post membership groups. |
includes/shortcodes/ld_user_groups.php: learndash_user_groups () |
Builds the |
includes/ld-groups.php: learndash_is_user_in_group () |
Checks whether a user is part of the group or not. |
includes/ld-groups.php: learndash_user_group_enrolled_to_course () |
Checks whether a course can be accessed by the user’s group. |
includes/ld-groups.php: learndash_user_group_enrolled_to_course_from () |
Gets timestamp of when the course is available to a user in a group. |
includes/ld-groups.php: learndash_set_users_group_ids () |
Adds a user to the list of given group IDs. |
includes/ld-users.php: learndash_get_user_groups_courses_ids () |
Gets all courses accessible by the user’s groups. |
includes/rest-api/v1/class-ld-rest-users-groups-controller.php: LD_REST_Users_Groups_Controller_V1::get_user_groups () |
Get Users Groups. |
includes/shortcodes/ld_student.php: learndash_student_check_shortcode () |
Builds the |
includes/shortcodes/ld_visitor.php: learndash_visitor_check_shortcode () |
Builds the |
includes/shortcodes/ld_course_list.php: ld_course_list () |
Builds the |
includes/admin/class-learndash-admin-user-profile-edit.php: Learndash_Admin_User_Profile_Edit::show_user_groups () |
Show User Enrolled Groups Binary Selector. |