API function which checks for parent group?
-
I have my groups tree set up as follows:
ParentGroup
-ChildGroup1
-ChildGroup2To make things more straightforward in coding, I want to be able to check if members are in a parent group and then have more granular capabilities in the child groups. However, the following code doesn’t work for users who are in the child groups:
$is_forum_member = 'false'; $group = Groups_Group::read_by_name( 'ParentGroup' ) ; $is_forum_member = Groups_User_Group::read( get_current_user_id() , $group->group_id );$is_forum_member returns false for users who are in either ChildGroup1 or ChildGroup2
Is there a function where this will work? I can’t seem to find it in the API docs.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘API function which checks for parent group?’ is closed to new replies.