Class UserProvider
The implementation of the UserProviderInterface to work with the CRUDlex API.
- CRUDlex\UserProvider implements Symfony\Component\Security\Core\User\UserProviderInterface
protected
string[]
|
|
protected
string[]
|
#
loadUserRolesViaManyToMany( Entity $user )
Loads the roles of an user via a many-to-many relationship |
public
|
#
__construct( CRUDlex\AbstractData $userData, string|CRUDlex\AbstractData $userRoleIdentifier = 'roles', string $usernameField = 'username', string $passwordField = 'password', string $saltField = 'salt' )
Constructor for data structures connecting users and roles via a many-to-many relationship on the user. |
public
|
#
loadUserByUsername( string $username )
Loads and returns an user by username. Throws an UsernameNotFoundException on not existing username. |
public
|
#
refreshUser( Symfony\Component\Security\Core\User\UserInterface $user )
Reloads and returns the given user. Throws an UsernameNotFoundException if the user ceased to exist meanwhile. |
public
boolean
|
#
supportsClass( string $class )
Tests whether the given user class is supported by this UserProvider. |
protected
|
$usernameField
The Entity fieldname of the username. |
|
protected
|
$passwordField
The fieldname of the password (hash). |
|
protected
|
$saltField
The fieldname of the password hash salt. |
|
protected
|
$userData
Holds the AbstractData instance to grab the user data from. |
|
protected
|
$userRoleData
Holds the AbstractData instance or the field of the many-to-many relationship to grab the user role data from. |
|
protected
|
$userRoleIdentifier
Holds the AbstractData instance or the field of the many-to-many relationship to grab the user role data from. |