fix: 🐛 disable password rehash for CRM customers

This commit is contained in:
Alexis Gousseau 2026-10-01 12:13:41 +02:00
parent 2cf5c76b35
commit e5380fcacf
No known key found for this signature in database
GPG key ID: 7F3C786EE12DBB72
2 changed files with 25 additions and 2 deletions

View file

@ -14,7 +14,6 @@ use Illuminate\Support\Str;
use LDC\LDCCRM\Enums\ApiError;
use LDC\LDCCRM\Exceptions\ApiErrorException;
use LDC\LDCCRM\Exceptions\CrmException;
use LDC\LDCCRM\Models\Customer as CrmCustomer;
/**
* Crm user provider to integrate nicely with Laravel
@ -133,9 +132,25 @@ class CrmUserProvider extends EloquentUserProvider implements UserProviderContra
Log::error(__CLASS__ . '::validateCredentials reached end of possibilities.');
return null;
}
/**
* CRM customer passwordless (Laravel 11 introduces password rehashing after login).
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param array $credentials
* @param boolean $force
* @return void
*/
public function rehashPasswordIfRequired(
UserContract $user,
#[\SensitiveParameter] array $credentials,
bool $force = false
): void {
//
}
/**
* Create a local customer
* Create a local customer.
*
* @param \LDC\LDCCRM\Models\Customer $crmCustomer
* @return \Illuminate\Database\Eloquent\Model

View file

@ -286,6 +286,14 @@ class Customer extends Authenticatable implements MustVerifyEmail
}
}
/**
* Get the password for the user.
*/
public function getAuthPassword(): string
{
return '';
}
// * --- END AUTH ---
/**