Skip to content

Commit

Permalink
Doc'd that unusable passwords are defined by metadata in the password…
Browse files Browse the repository at this point in the history
… field.
  • Loading branch information
Flimm authored Oct 23, 2024
1 parent 4d11ea1 commit de2bb73
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/ref/contrib/auth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -175,8 +176,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.
Expand Down

0 comments on commit de2bb73

Please sign in to comment.