mediatekformation

InMemoryUserProvider
in package
implements UserProviderInterface

InMemoryUserProvider is a simple non persistent user provider.

Useful for testing, demonstration, prototyping, and for simple needs (a backend with a unique admin for instance)

Tags
author

Fabien Potencier fabien@symfony.com

Interfaces, Classes, Traits and Enums

UserProviderInterface
Represents a class that loads UserInterface objects from some source for the authentication system.

Table of Contents

$users  : mixed
__construct()  : mixed
The user array is a hash where the keys are usernames and the values are an array of attributes: 'password', 'enabled', and 'roles'.
createUser()  : mixed
Adds a new User to the provider.
loadUserByUsername()  : UserInterface
Loads the user for the given username.
refreshUser()  : UserInterface
Refreshes the user.
supportsClass()  : bool
Whether this provider supports the given user class.
getUser()  : User
Returns the user by given username.

Properties

Methods

__construct()

The user array is a hash where the keys are usernames and the values are an array of attributes: 'password', 'enabled', and 'roles'.

public __construct([array<string|int, mixed> $users = [] ]) : mixed
Parameters
$users : array<string|int, mixed> = []

An array of users

Return values
mixed

supportsClass()

Whether this provider supports the given user class.

public supportsClass(mixed $class) : bool
Parameters
$class : mixed
Return values
bool

Search results