Skip to content

Commit ad4c3c9

Browse files
authored
Merge pull request #738 from txj/patch-1
Update password-hashers.rst
2 parents a3154b5 + 176b73e commit ad4c3c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/en/password-hashers.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ fallback hasher as follows::
4747
'passwordHasher' => [
4848
'className' => 'Authentication.Fallback',
4949
'hashers' => [
50-
'Authentication.Default' => [
50+
'Authentication.Default',
51+
[
5152
'className' => 'Authentication.Legacy',
5253
'hashType' => 'md5',
5354
'salt' => false, // turn off default usage of salt
@@ -68,8 +69,7 @@ password needs to be upgraded::
6869

6970
// regardless of POST or GET, redirect if user is logged in
7071
if ($result->isValid()) {
71-
// Assuming you are using the `Password` identifier.
72-
if ($authentication->identifiers()->get('Password')->needsPasswordRehash()) {
72+
if ($authentication->getIdentificationProvider()->needsPasswordRehash()) {
7373
// Rehash happens on save.
7474
$user = $this->Users->get($authentication->getIdentity()->getIdentifier());
7575
$user->password = $this->request->getData('password');

0 commit comments

Comments
 (0)