Changeset 5774
- Timestamp:
- 07/29/07 13:21:16 (1 year ago)
- Files:
-
- django/trunk/docs/authentication.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/authentication.txt
r5771 r5774 100 100 101 101 * ``is_authenticated()`` -- Always returns ``True``. This is a way to 102 tell if the user has been authenticated. This does not imply any 102 tell if the user has been authenticated. This does not imply any 103 103 permissions, and doesn't check if the user is active - it only indicates 104 104 that the user has provided a valid username and password. … … 115 115 password hashing in making the comparison.) 116 116 117 * ``set_unusable_password()`` -- Marks the user as having no password set.118 This isn't the same as having a blank string for a password.119 ``check_password()`` for this user will never return ``True``. Doesn't120 save the ``User`` object.121 122 You may need this if authentication for your application takes place 117 * ``set_unusable_password()`` -- **New in Django development version.** 118 Marks the user as having no password set. This isn't the same as having 119 a blank string for a password. ``check_password()`` for this user will 120 never return ``True``. Doesn't save the ``User`` object. 121 122 You may need this if authentication for your application takes place 123 123 against an existing external source such as an LDAP directory. 124 124 125 * ``has_usable_password()`` -- Returns ``False`` if 126 ``set_unusable_password()`` has been called for this user. 125 * ``has_usable_password()`` -- **New in Django development version.** 126 Returns ``False`` if ``set_unusable_password()`` has been called for this 127 user. 127 128 128 129 * ``get_group_permissions()`` -- Returns a list of permission strings that … … 138 139 * ``has_perms(perm_list)`` -- Returns ``True`` if the user has each of the 139 140 specified permissions, where each perm is in the format 140 ``"package.codename"``. If the user is inactive, this method will 141 ``"package.codename"``. If the user is inactive, this method will 141 142 always return ``False``. 142 143 … … 164 165 The ``User`` model has a custom manager that has the following helper functions: 165 166 166 * ``create_user(username, email, password=None)`` -- Creates, saves and 167 * ``create_user(username, email, password=None)`` -- Creates, saves and 167 168 returns a ``User``. The ``username``, ``email`` and ``password`` are set 168 169 as given, and the ``User`` gets ``is_active=True``. 169 170 170 171 If no password is provided, ``set_unusable_password()`` will be called. 171 172
