PHP Class CakeDC\Users\Model\Entity\User

Inheritance: extends Cake\ORM\Entity
Datei anzeigen Open project: cakedc/users

Protected Properties

Property Type Description
$_accessible array Fields that can be mass assigned using newEntity() or patchEntity().
$_hidden array Fields that are excluded from JSON an array versions of the entity.

Public Methods

Method Description
checkPassword ( string $password, string $hashedPassword ) : boolean Checks if a password is correctly hashed
getPasswordHasher ( ) : mixed Return the configured Password Hasher
hashPassword ( string $password ) : mixed Hash a password using the configured password hasher, use DefaultPasswordHasher if no one was configured
tokenExpired ( ) : boolean Returns if the token has already expired
updateToken ( integer $tokenExpiration ) : void Generate token_expires and token in a user

Protected Methods

Method Description
_getAvatar ( ) : string | null Getter for user avatar
_setConfirmPassword ( string $password ) : boolean | string
_setPassword ( string $password ) : boolean | string
_setTos ( string $tos ) : boolean

Method Details

_getAvatar() protected method

Getter for user avatar
protected _getAvatar ( ) : string | null
return string | null avatar

_setConfirmPassword() protected method

protected _setConfirmPassword ( string $password ) : boolean | string
$password string password that will be confirm.
return boolean | string

_setPassword() protected method

protected _setPassword ( string $password ) : boolean | string
$password string password that will be set.
return boolean | string

_setTos() protected method

protected _setTos ( string $tos ) : boolean
$tos string tos option. It will be set the tos_date
return boolean

checkPassword() public method

Checks if a password is correctly hashed
public checkPassword ( string $password, string $hashedPassword ) : boolean
$password string password that will be check.
$hashedPassword string hash used to check password.
return boolean

getPasswordHasher() public method

Return the configured Password Hasher
public getPasswordHasher ( ) : mixed
return mixed

hashPassword() public method

Hash a password using the configured password hasher, use DefaultPasswordHasher if no one was configured
public hashPassword ( string $password ) : mixed
$password string password to be hashed
return mixed

tokenExpired() public method

Returns if the token has already expired
public tokenExpired ( ) : boolean
return boolean

updateToken() public method

Generate token_expires and token in a user
public updateToken ( integer $tokenExpiration ) : void
$tokenExpiration integer seconds to expire the token from Now
return void

Property Details

$_accessible protected_oe property

Fields that can be mass assigned using newEntity() or patchEntity().
protected array $_accessible
return array

$_hidden protected_oe property

Fields that are excluded from JSON an array versions of the entity.
protected array $_hidden
return array