DatabaseUserProvider
class DatabaseUserProvider implements UserProvider
Methods
Create a new database user provider.
Get the database connection.
Retrieve a user by their unique identifier.
Retrieve a user by their unique identifier and "remember me" token.
Update the "remember me" token for the given user in storage.
Retrieve a user by the given credentials.
Get the generic user.
Validate a user against the given credentials.
Rehash the user's password if required and supported.
Details
at line 24
__construct(ConnectionInterface|ConnectionResolverInterface $connection, Hasher $hasher, string $table, string|null $connectionName = null)
Create a new database user provider.
Cached providers should receive a resolver because a concrete pooled connection is returned to its pool when the owning coroutine ends.
at line 35
protected ConnectionInterface
getConnection()
Get the database connection.
at line 47
Authenticatable|null
retrieveById(mixed $identifier)
Retrieve a user by their unique identifier.
at line 57
Authenticatable|null
retrieveByToken(mixed $identifier, string $token)
Retrieve a user by their unique identifier and "remember me" token.
at line 71
void
updateRememberToken(Authenticatable $user, string $token)
Update the "remember me" token for the given user in storage.
at line 81
Authenticatable|null
retrieveByCredentials(array $credentials)
Retrieve a user by the given credentials.
at line 119
protected GenericUser|null
getGenericUser(mixed $user)
Get the generic user.
at line 131
bool
validateCredentials(Authenticatable $user, array $credentials)
Validate a user against the given credentials.
at line 147
void
rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false)
Rehash the user's password if required and supported.