The PasswordHistory model has a custom manager that has the following helper functions:
Deletes expired password history entries from the database(s).
| Parameters: | 
 | 
|---|
Checks if the user needs to change his/her password.
| Parameters: | user (object) – A User instance. | 
|---|---|
| Returns: | True if the user needs to change his/her password, False otherwise. | 
| Return type: | bool | 
Compares a raw (UNENCRYPTED!!!) password to entries in the users’s password history.
| Parameters: | |
|---|---|
| Returns: | False if a password has been used before, True if not. | 
| Return type: | bool | 
Gets the newest password history entry.
| Parameters: | user (object) – A User instance. | 
|---|---|
| Returns: | A PasswordHistory instance if found, None if not. |