Tiger_Model_PasswordHistory

@api · extends Tiger_Model_Table

PasswordHistory — retained old password hashes (see migration 0012).

Written by Tiger_Model_UserCredential::setPassword (archives the old hash before overwriting); read by Tiger_Policy_Password for reuse-prevention.

Methods

archive()

archive($userId, $hash)

Archive a retired password hash for a user.

  • $userId string — the user id
  • $hash string — the retired password hash to archive

Returns string — the password_history_id

recentForUser()

recentForUser($userId, $limit = 5)

The user's last N retired hashes, newest first.

  • $userId string — the user id
  • $limit int — the maximum number of hashes to return

Returns Zend_Db_Table_Rowset_Abstract — the retired hashes, newest first

prune()

prune($userId, $keep)

Keep only the newest $keep rows for a user (bounded history).

  • $userId string — the user id
  • $keep int — the number of newest rows to retain