Skip to content

Commit 34bcf9f

Browse files
committed
Implement new Laravel 11 method
1 parent 3a7108b commit 34bcf9f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/Auth/DatabaseUserProvider.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,12 @@ public function validateCredentials(Authenticatable $user, array $credentials):
200200

201201
return true;
202202
}
203+
204+
/**
205+
* {@inheritdoc}
206+
*/
207+
public function rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false): void
208+
{
209+
$this->eloquent->rehashPasswordIfRequired($user, $credentials, $force);
210+
}
203211
}

src/Auth/NoDatabaseUserProvider.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,12 @@ public function validateCredentials(Authenticatable $user, array $credentials):
5454

5555
return true;
5656
}
57+
58+
/**
59+
* {@inheritdoc}
60+
*/
61+
public function rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false)
62+
{
63+
// We can't rehash LDAP users passwords.
64+
}
5765
}

0 commit comments

Comments
 (0)