> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pysquirrels.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CustomUserFields

> Base class for custom user fields

Extend this class to add custom user fields to registered users in `pyconfigs/user.py`. The derived class must also be named `CustomUserFields`.

This class can be imported from the `squirrels.auth` or the `squirrels` module.

## Example

```python theme={null}
from squirrels import auth

class CustomUserFields(auth.CustomUserFields):
    department: str = "general"
    employee_id: int | None = None
```

<Warning>
  Always set a default value for each custom field. Use `None` if default is null.

  Failure to do so will result in a validation error.
</Warning>

## Supported field types

Each new field in the derived class must be of one of the following types:

* `str` - String values
* `int` - Integer values
* `float` - Float values
* `bool` - Boolean values
* `typing.Literal` - Literal types

Add `| None` after the type to make it nullable.
