DatabaseUserProvider
class DatabaseUserProvider implements UserProvider (View source)
Properties
protected ConnectionInterface | $connection | The active database connection. |
|
protected Hasher | $hasher | The hasher implementation. |
|
protected string | $table | The table containing the users. |
Methods
Create a new database user provider.
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
void
__construct(ConnectionInterface $connection, Hasher $hasher, string $table)
Create a new database user provider.
Authenticatable|null
retrieveById(mixed $identifier)
Retrieve a user by their unique identifier.
Authenticatable|null
retrieveByToken(mixed $identifier, string $token)
Retrieve a user by their unique identifier and "remember me" token.
void
updateRememberToken(Authenticatable $user, string $token)
Update the "remember me" token for the given user in storage.
Authenticatable|null
retrieveByCredentials(array $credentials)
Retrieve a user by the given credentials.
protected GenericUser|null
getGenericUser(mixed $user)
Get the generic user.
bool
validateCredentials(Authenticatable $user, array $credentials)
Validate a user against the given credentials.
void
rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false)
Rehash the user's password if required and supported.