From 4a04944f0779d89479880eeb09fe3fea41d976f9 Mon Sep 17 00:00:00 2001 From: amirreza sohrabi far <119850973+amirreza8002@users.noreply.github.com> Date: Tue, 4 Feb 2025 23:05:07 +0330 Subject: [PATCH] [5.1.x] Clarified docs for default email value in UserManager.create_user(). Backport of 5da3ad7bf90fba7321f4c2834db44aa920c70bc7 from main. --- docs/ref/contrib/auth.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt index 9185c9d0f9..9e23a35edb 100644 --- a/docs/ref/contrib/auth.txt +++ b/docs/ref/contrib/auth.txt @@ -284,6 +284,9 @@ Manager methods :meth:`~django.contrib.auth.models.User.set_unusable_password()` will be called. + If no email is provided, :attr:`~django.contrib.auth.models.User.email` + will be set to an empty string. + The ``extra_fields`` keyword arguments are passed through to the :class:`~django.contrib.auth.models.User`’s ``__init__`` method to allow setting arbitrary fields on a :ref:`custom user model