class CustomUserProvider extends EloquentUserProvider (View source)

Custom user provider that supports binary UUID identifiers.

Methods

Authenticatable|null
retrieveById(mixed $identifier)

Retrieve a user by their unique identifier.

string|null
uuidStringToBytes(string $uuid)

Convert a UUID string representation to its binary form.

Details

Authenticatable|null retrieveById(mixed $identifier)

Retrieve a user by their unique identifier.

Parameters

mixed $identifier

the unique user identifier (UUID string or binary)

Return Value

Authenticatable|null

the retrieved user instance or null if not found

protected string|null uuidStringToBytes(string $uuid)

Convert a UUID string representation to its binary form.

Parameters

string $uuid

the UUID in string format

Return Value

string|null

the binary representation of the UUID, or null if invalid

Exceptions

InvalidUuidStringException