Class CRUDUserSetup
This class setups CRUDlex with some events so the passwords get salted and
hashed properly.
Namespace: CRUDlex
Located at CRUDUserSetup.php
Methods summary
public
string
|
#
getSalt( integer $len )
Generates a random salt of the given length.
Generates a random salt of the given length.
Parameters
Returns
string a random salt of the given length
|
public
|
#
addEvents( CRUDlex\CRUDData $data, string $passwordField = 'password', string $saltField = 'salt' )
Setups CRUDlex with some events so the passwords get salted and
hashed properly.
Setups CRUDlex with some events so the passwords get salted and
hashed properly.
Parameters
- $data
- the CRUDData instance managing the users
- $passwordField
- the CRUDEntity fieldname of the password hash
- $saltField
- the CRUDEntity fieldname of the password hash salt
|