EntityUserProvider
in package
implements
UserProviderInterface, PasswordUpgraderInterface
Wrapper around a Doctrine ObjectManager.
Provides provisioning for Doctrine entity users.
Tags
Table of Contents
Interfaces
- UserProviderInterface
- Represents a class that loads UserInterface objects from some source for the authentication system.
- PasswordUpgraderInterface
Properties
- $class : string
- $classOrAlias : string
- $managerName : string|null
- $property : string|null
- $registry : mixed
Methods
- __construct() : mixed
- loadUserByIdentifier() : UserInterface
- Loads the user for the given user identifier (e.g. username or email).
- refreshUser() : UserInterface
- Refreshes the user.
- supportsClass() : bool
- Whether this provider supports the given user class.
- upgradePassword() : void
- Upgrades the hashed password of a user, typically for using a better hash algorithm.
- getClass() : string
- getClassMetadata() : ClassMetadata
- getObjectManager() : ObjectManager
- getRepository() : ObjectRepository
Properties
$class
private
string
$class
$classOrAlias
private
string
$classOrAlias
$managerName
private
string|null
$managerName
$property
private
string|null
$property
$registry
private
mixed
$registry
Methods
__construct()
public
__construct(ManagerRegistry $registry, string $classOrAlias[, string $property = null ][, string $managerName = null ]) : mixed
Parameters
- $registry : ManagerRegistry
- $classOrAlias : string
- $property : string = null
- $managerName : string = null
loadUserByIdentifier()
Loads the user for the given user identifier (e.g. username or email).
public
loadUserByIdentifier(string $identifier) : UserInterface
This method must throw UserNotFoundException if the user is not found.
Parameters
- $identifier : string
Return values
UserInterfacerefreshUser()
Refreshes the user.
public
refreshUser(UserInterface $user) : UserInterface
Parameters
- $user : UserInterface
Return values
UserInterfacesupportsClass()
Whether this provider supports the given user class.
public
supportsClass(string $class) : bool
Parameters
- $class : string
Return values
boolupgradePassword()
Upgrades the hashed password of a user, typically for using a better hash algorithm.
public
upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword) : void
Parameters
- $user : PasswordAuthenticatedUserInterface
- $newHashedPassword : string
Tags
getClass()
private
getClass() : string
Return values
stringgetClassMetadata()
private
getClassMetadata() : ClassMetadata
Return values
ClassMetadatagetObjectManager()
private
getObjectManager() : ObjectManager
Return values
ObjectManagergetRepository()
private
getRepository() : ObjectRepository