public function setValidated($id) { $now = new \Nette\DateTime(); $this->localLoginModel->update($id, array("validated" => $now->format('Y-m-d H:i:s'))); }
/** * Gets the cookie * * @param string $cookieValue */ protected function createCookie($cookieValue) { $currentDate = new Nette\DateTime('+1 month'); // Create cookie object $cookie = new Cookie(self::COOKIE_KEY, $cookieValue, $currentDate->format('Y-m-d')); // Store cookie in response $this->httpResponse->setCookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); }