# User Groups

## Overview

The User Group fieldtype gives your users a way to pick one or more User Groups to attach to the current entry. What you do with that relationship is up to you, but most likely you'll be either listing users or combining it with the [User:In](/tags/user-in.md) tag to protect content or areas of the frontend.

## Data Storage

The User Group fieldtype stores the `handle` of a single group as a string, or an array of handles if `max_items` is greater than 1.

## Templating

The User Group fieldtype uses [augmentation](/augmentation.md) to return the `title` and `handle` of each Group. You can use pass these values into the `{{ user:in }}` tag to protect content.

The following example assumes `max_items` has been set to `1`.

::tabs

::tab antlers
```antlers
{{ user:in :group="group_field:handle" }}
  You are in the {{ group_field:title }} group. Nice!
{{ /user:in }}
```
::tab blade
```blade
{{-- Using Statamic Tags --}}
<statamic:user:in
  :group="$group_field->handle"
>
  You are in the {{ $group_field->title }} group. Nice!
</statamic:user:in>

{{-- Using Fluent Tags --}}
@if(Statamic::tag('user:in')->group($group_field->handle)->fetch())
  You are in the {{ $group_field->title }} group. Nice!
@endif
```
::