Example #1
0
 /**
  * Generate token_expires and token in a user
  * @param int $tokenExpiration 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());
 }