From 34bcf9ffed793e832df5330cd31540554d90e38e Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Wed, 13 Mar 2024 09:40:27 -0400 Subject: [PATCH] Implement new Laravel 11 method --- src/Auth/DatabaseUserProvider.php | 8 ++++++++ src/Auth/NoDatabaseUserProvider.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Auth/DatabaseUserProvider.php b/src/Auth/DatabaseUserProvider.php index 9d51edfb..12c759f7 100644 --- a/src/Auth/DatabaseUserProvider.php +++ b/src/Auth/DatabaseUserProvider.php @@ -200,4 +200,12 @@ public function validateCredentials(Authenticatable $user, array $credentials): return true; } + + /** + * {@inheritdoc} + */ + public function rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false): void + { + $this->eloquent->rehashPasswordIfRequired($user, $credentials, $force); + } } diff --git a/src/Auth/NoDatabaseUserProvider.php b/src/Auth/NoDatabaseUserProvider.php index cfd2b859..255130fa 100644 --- a/src/Auth/NoDatabaseUserProvider.php +++ b/src/Auth/NoDatabaseUserProvider.php @@ -54,4 +54,12 @@ public function validateCredentials(Authenticatable $user, array $credentials): return true; } + + /** + * {@inheritdoc} + */ + public function rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false) + { + // We can't rehash LDAP users passwords. + } }