CakeDC\Users\Model\Entity\User::updateToken PHP Method

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
    public function updateToken($tokenExpiration = 0)
    {
        $expiration = new Time('now');
        $this->token_expires = $expiration->addSeconds($tokenExpiration);
        $this->token = str_replace('-', '', Text::uuid());
    }