# Cookiecutter auth user model (errors)

**URL:** https://forum.djangoproject.com/t/cookiecutter-auth-user-model-errors/26247
**Category:** Mystery Errors
**Created:** [December 17, 2023, 5:00pm UTC](https://forum.djangoproject.com/t/cookiecutter-auth-user-model-errors/26247 "2023-12-17T17:00:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![phosphide](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/phosphide/32/14720_2.png) [@phosphide](https://forum.djangoproject.com/u/phosphide)
#### Post date: [December 17, 2023, 5:00pm UTC](https://forum.djangoproject.com/t/cookiecutter-auth-user-model-errors/26247/1 "2023-12-17T17:00:00Z")

</div>

Hello, I’m using the cookiecutter project with email as the required login, but I’m not sure how to query the user correctly. Snippets of my code below.

**Settings (base.py)**

```auto
AUTH_USER_MODEL = "users.User"

```

**Model**

```auto
from django.conf import settings

create_user_id = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE,verbose_name = "Create User ID")

```

**View/form**

```auto
from django.contrib.auth import get_user_model
User = get_user_model()

self.fields['create_user_id'] = request.user ###DOESN'T WORK
self.fields['create_user_id'] = User.objects.get(email=request.user) ###DOESN'T WORK

```

**Error**

```auto
'User' object has no attribute 'get_bound_field'

```

What is the appropriate way to get the user? Do I have the right settings in the model? Ultimately I need to save the user with the model form.

Appreciate any help, thank you!

---

<div class="post-metadata">

### Author: ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)
#### Post date: [December 17, 2023, 5:17pm UTC](https://forum.djangoproject.com/t/cookiecutter-auth-user-model-errors/26247/2 "2023-12-17T17:17:09Z")

</div>

> [@phosphide](#):
>
> but I’m not sure how to query the user correctly.

Please show the complete view and form, and provide more detail about what it is that you’re trying to accomplish here. (What are you trying to do with the User object that you’re trying to retrieve?)
