/** * Remember login in cookie * * @param mixed $login User's login * * @return void */ protected function rememberLogin($login) { $options = \XLite::getInstance()->getOptions('host_details'); $ttl = time() + 86400 * intval(\XLite\Core\Config::getInstance()->General->login_lifetime); foreach (array($options['http_host'], $options['https_host']) as $host) { @setcookie('recent_login', $login, $ttl, '/', func_parse_host($host)); } }
/** * Get path * * @return string */ public function getPath() { return \XLite::isAdminZone() ? func_parse_host(\XLite::getInstance()->getShopURL(), true) : ''; }