Detecting user role and specific group (by group id or group name)
-
Probably pretty easy but i’ve been fiddling with this for a few days now. It’s definitely detecting the user role, but I just can’t get it to respond to the logged in users specific group. This is what I have so far:
if ($current_user_is == worker && ‘public’ == $bp->groups->current_group->status && groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->name == ‘test’ ) )
{
echo’farm’;
} else {echo ‘farm animals’;
}
Any clues?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Detecting user role and specific group (by group id or group name)’ is closed to new replies.