Thanks, @itthinx.
I’m not very good with PHP objects, so went for the ‘long but simple’ route.
$userid = $current_user->ID;
$user = new Groups_User( $userid );
$groups = $user->__get( 'groups' );
$gr1 = (get_object_vars($groups[1]));
$gr2 = (get_object_vars($gr1[group]));
if ($gr2 != "Team members" && $gr2 != "Associates")
{
wp_die('This function is only for Team members and Associates. Would you like to <a href="'.wp_logout_url( $redirect ).'">log in as another user</a>?');
}
Thanks again,
R