Overview

Namespaces

  • CRUDlex

Classes

  • CRUDUser
  • CRUDUserProvider
  • CRUDUserSetup
  • Overview
  • Namespace
  • Class

Class CRUDUserProvider

The implementation of the UserProviderInterface to work with the CRUDlex API.

CRUDlex\CRUDUserProvider implements Symfony\Component\Security\Core\User\UserProviderInterface
Namespace: CRUDlex
Located at CRUDUserProvider.php
Methods summary
public
# __construct( CRUDlex\CRUDData $userData, CRUDlex\CRUDData $userRoleData, string $usernameField = 'username', string $passwordField = 'password', string $saltField = 'salt' )

Constructor.

Constructor.

Parameters

$userData
the CRUDData instance to grab the user data from
$userRoleData
the CRUDData instance to grab the user role data from
$usernameField
the CRUDEntity fieldname of the username
$passwordField
the CRUDEntity fieldname of the password hash
$saltField
the CRUDEntity fieldname of the password hash salt
public CRUDlex\CRUDUser
# loadUserByUsername( string $username )

Loads and returns an user by username. Throws an UsernameNotFoundException on not existing username.

Loads and returns an user by username. Throws an UsernameNotFoundException on not existing username.

Parameters

$username
the username

Returns

CRUDlex\CRUDUser
the loaded user
public CRUDlex\CRUDUser
# refreshUser( Symfony\Component\Security\Core\User\UserInterface $user )

Reloads and returns the given user. Throws an UsernameNotFoundException if the user ceased to exist meanwhile.

Reloads and returns the given user. Throws an UsernameNotFoundException if the user ceased to exist meanwhile.

Parameters

$user
the user to reload

Returns

CRUDlex\CRUDUser
the reloaded user
public boolean
# supportsClass( string $class )

Tests whether the given user class is supported by this UserProvider.

Tests whether the given user class is supported by this UserProvider.

Parameters

$class
the user class name to test

Returns

boolean
true if the class is "CRUDlex\CRUDUser"
Properties summary
protected $usernameField

The CRUDEntity fieldname of the username.

The CRUDEntity fieldname of the username.

#
protected $passwordField

The fieldname of the password (hash).

The fieldname of the password (hash).

#
protected $saltField

The fieldname of the password hash salt.

The fieldname of the password hash salt.

#
protected $userData

Holds the CRUDData instance to grab the user data from.

Holds the CRUDData instance to grab the user data from.

#
protected $userRoleData

Holds the CRUDData instance to grab the user role data from.

Holds the CRUDData instance to grab the user role data from.

#
CRUDlexUser API API documentation generated by ApiGen