PHP Class CakeDC\Users\Model\Behavior\PasswordBehavior

Inheritance: extends Behavior
Show file Open project: cakedc/users

Public Methods

Method Description
changePassword ( Cake\Datasource\EntityInterface $user ) : mixed Change password method
initialize ( array $config ) : void Constructor hook method.
resetToken ( string $reference, array $options = [] ) : string Resets user token

Protected Methods

Method Description
_getUser ( string $reference ) : mixed Get the user by email or username

Method Details

_getUser() protected method

Get the user by email or username
protected _getUser ( string $reference ) : mixed
$reference string reference could be either an email or username
return mixed user entity if found

changePassword() public method

Change password method
public changePassword ( Cake\Datasource\EntityInterface $user ) : mixed
$user Cake\Datasource\EntityInterface user data.
return mixed

initialize() public method

Constructor hook method.
public initialize ( array $config ) : void
$config array The configuration settings provided to this behavior.
return void

resetToken() public method

Resets user token
public resetToken ( string $reference, array $options = [] ) : string
$reference string User username or email
$options array checkActive, sendEmail, expiration
return string