Class UserSetup
This class setups CRUDlex with some events so the passwords get salted and hashed properly.
protected
|
#
getPWHashFunction( CRUDlex\AbstractData $data, string $passwordField, string $saltField )
Gets a closure for possibly generating a password hash in the entity. |
public
|
#
__construct( Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface $encoder = null )
Constructor. |
public
boolean
|
#
possibleGenSalt( string & $salt, CRUDlex\Entity $entity, string $saltField )
Generates a new salt if the given salt is null. |
public
boolean
|
#
doGenerateHash( CRUDlex\AbstractData $data, CRUDlex\Entity $entity, string $passwordField, string $password, boolean $newSalt )
Determines whether the entity needs a new hash generated. |
public
string
|
|
public
|
#
addEvents( CRUDlex\AbstractData $data, string $passwordField = 'password', string $saltField = 'salt' )
Setups CRUDlex with some events so the passwords get salted and hashed properly. |
protected
|
$encoder
The encoder to use. |