summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorDavid D Lowe <daviddlowe.flimm@gmail.com>2024-10-23 18:20:36 +0100
committerNatalia <124304+nessita@users.noreply.github.com>2024-10-23 14:21:05 -0300
commit8bfa520a01a0156533079b5906aed7ea4629eb72 (patch)
tree4451011d5ee016f9a4781a9459d2470959086f2d /docs/ref
parent630c9e1f9d05e9d25908a0c5d5f81f1b0b537af0 (diff)
[5.1.x] Doc'd that unusable passwords are defined by metadata in the password field.
Backport of de2bb73904009313bae3664ef71edfd60df9912b from main.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/auth.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
index 036f8d9f76..9185c9d0f9 100644
--- a/docs/ref/contrib/auth.txt
+++ b/docs/ref/contrib/auth.txt
@@ -54,7 +54,8 @@ Fields
Required. A hash of, and metadata about, the password. (Django doesn't
store the raw password.) Raw passwords can be arbitrarily long and can
- contain any character. See the :doc:`password documentation
+ contain any character. The metadata in this field may mark the password
+ as unusable. See the :doc:`password documentation
</topics/auth/passwords>`.
.. attribute:: groups
@@ -179,8 +180,9 @@ Methods
.. method:: set_unusable_password()
- Marks the user as having no password set. This isn't the same as
- having a blank string for a password.
+ Marks the user as having no password set by updating the metadata in
+ the :attr:`~django.contrib.auth.models.User.password` field. This isn't
+ the same as having a blank string for a password.
:meth:`~django.contrib.auth.models.User.check_password()` for this user
will never return ``True``. Doesn't save the
:class:`~django.contrib.auth.models.User` object.