/** * Checks if the remember password token is expired or not. * * @throws UserTokenNotFoundException when the remember password token does not exist * * @return bool */ public function isRememberPasswordTokenExpired() { if (!$this->rememberPasswordToken instanceof UserToken) { throw new UserTokenNotFoundException(); } return $this->rememberPasswordToken->isExpired($this->rememberPasswordTokenLifetime()); }
/** * {@inheritdoc} */ public function userOfRememberPasswordToken(UserToken $aRememberPasswordToken) { $statement = $this->execute('SELECT * FROM user WHERE remember_password_token_token = :rememberPasswordToken', ['rememberPasswordToken' => $aRememberPasswordToken->token()]); if ($row = $statement->fetch(\PDO::FETCH_ASSOC)) { return $this->buildUser($row); } }
/** * Method that checks if the id given is equal to the current. * * @param UserToken $aToken The token * * @return bool */ public function equals(UserToken $aToken) { return $this->token === $aToken->token(); }