Testing if user is in a group

Posted by iamthemik3 on
URL: https://support.nabble.com/Testing-if-user-is-in-a-group-tp6956317.html

How would I go about testing whether a user is in a particular group? I want to conditionally display content based on a user's membership.
I found the "n.visible_for_admins" macro but that only applies to the administrators group. Is there a more generic version of this?