Esempio n. 1
0
 function onSignupStateLoad(Am_Event $e)
 {
     $code = $e->getCode();
     if ($cookie = $this->getDi()->store->get(self::STORE_PREFIX . $code)) {
         $tm = $this->getDi()->time + $this->getDi()->config->get('aff.cookie_lifetime', 30) * 3600 * 24;
         Am_Controller::setCookie(self::COOKIE_NAME, $cookie, $tm, '/', $_SERVER['HTTP_HOST']);
         $_COOKIE[self::COOKIE_NAME] = $cookie;
     }
 }