diff --git a/security/passwords.rst b/security/passwords.rst index 2a2f7acc336..cdb4d09102e 100644 --- a/security/passwords.rst +++ b/security/passwords.rst @@ -830,6 +830,12 @@ If you need to create your own, it needs to follow these rules: return $passwordIsValid; } + + public function needsRehash(string $hashedPassword): bool + { + // Check if a password hash would benefit from rehashing + return $needsRehash; + } } Now, define a password hasher using the ``id`` setting: