check if cookie alive
@return bool
962313
public function isCookieAlive()
	{
		//	...
		$bRet = false;

		if ( $this->isKeepAlive() )
		{
			//
			//	return false if user set to keep alive
			//
			$bRet	= true;
		}
		else
		{
			//	...
			$nLoginTime = $this->m_cUCProMain->getXTInstance()->getTValue( UCProConst::CKT_LOGIN_TM );
			if ( is_numeric( $nLoginTime ) )
			{
				//
				//	escaped time in seconds after user logged in
				//      the default timeout is 1 day.
				//
				$fTerm	= floatval( time() - floatval( $nLoginTime ) );
				$bRet	= ( $fTerm <= $this->m_cUCProMain->getConfig_nCookieTimeout() );
			}
			else
			{
				//
				//      login time is invalid
				//      So, we marked this cookie as timeout
				//
				$bRet	= false;
			}
		}

		return $bRet;
	}
1138111
protected function isAllowed()
    {
        if ($this->verifyCookie() || $this->allowAdmins() || $this->allowUsers() || $this->allowedIpAddress()) {
            return true;
        }

        return false;
    }
678610
protected function isSaved(): bool
    {
        return $this->filesystem->has($this->path)
            && $this->filesystem->getTimestamp($this->path) > $this->file->getUpdatedAt();
    }
1099179
protected function isProtected(string $cookie): bool
    {
        if (in_array($cookie, $this->config->cookiesExcluded())) {
            //Excluded
            return false;
        }

        return $this->config->cookieProtectionMethod() != HttpConfig::COOKIE_UNPROTECTED;
    }
251770
public function isLogged() {
        if ($this->isAuthenticated === false) {
            $this->isAuthenticated = $this->checkSession($this->getCurrentSessionHash());
        }
        return $this->isAuthenticated;
    }
1050449
public function isBypassEnabled() {
        $cookieName = Mage::helper('turpentine/data')->getBypassCookieName();
        $cookieValue = Mage::getModel('core/cookie')->get($cookieName);

        return $cookieValue === $this->getSecretHandshake();
    }
662455
public static function is_active() {
	if (session_status() != PHP_SESSION_ACTIVE) {
		return false;
	}
	if (empty($_SESSION['_session_type']) || empty($_SESSION['_session_last_active'])) {
		return false;
	}
	
	return true;
}
187302
protected function isCached()
    {
        $cacheTime = self::CACHE_TIME * 60;

        if (!is_file($this->pathCache)) {
            return false;
        }

        $cachedTime = filemtime($this->pathCache);
        $cacheAge = $this->time - $cachedTime;

        return $cacheAge < $cacheTime;
    }
1161988
function() {
      try {
        return navigator.cookieEnabled ||
          ("cookie" in $document && ($document.cookie.length > 0 ||
          ($document.cookie = "test").indexOf.call($document.cookie, "test") > -1));
      } catch (e) {
          $rootScope.$broadcast('LocalStorageModule.notification.error', e.message);
          return false;
      }
    }
1148030
public function isAlive(): bool
    {
        if (false === static::$testingEnabled) {
            return false !== fsockopen($this->getHost(), $this->getPort());
        }

        return static::$testingServiceIsUp;
    }
277507
public function isAlive()
    {
        $pid = pcntl_waitpid($this->_pid, $status, WNOHANG);
        $this->result = unserialize(trim(socket_read($this->sockets[1], $this->message_length)));
        socket_close($this->sockets[1]);

        return ($pid === 0);
    }
92541
public function isLoggedIn()
    {
        $isSimulatedLoggedIn = ($this->loggedInUser !== null);
        $isReallyLoggedIn = $this->getFrontEndController() !== null && $this->getFrontEndController()->loginUser;

        return $isSimulatedLoggedIn || $isReallyLoggedIn;
    }
633403
public function status()
	{
		try
		{
			$pingRequest = $this->connection->createPing();
			$ping = $this->connection->ping($pingRequest);
			$pong = $ping->getData();
			$alive = false;

			if (isset($pong['status']) && $pong['status'] === "OK")
			{
				return true;
			}
		}
		catch (\Solarium\Exception $e)
		{
			return false;
		}
	}
416718
public function isAlive()
    {
        if ( $this->attribute( 'status' ) != self::STATUS_WORKING )
            throw new Exception( 'The process\'s status isn\'t \'working\'' );

        // sending 0 only checks if the process is alive (and if the current process is allowed to send signals to it)
        $return = ( posix_kill( $this->attribute( 'pid' ), 0 ) === true );
        return $return;
    }
434248
public function check()
    {
        $response = $this->client->get($this->getURL());
        $cookie = $this->getCookie($response);
        $fullURL = $this->getURL();

        if ($cookie) {
            return [
                EnvironmentCheck::ERROR,
                "Sessions are being set for {$fullURL} : Set-Cookie => " . $cookie,
            ];
        }
        return [
            EnvironmentCheck::OK,
            "Sessions are not being created for {$fullURL} 👍",
        ];
    }
611272
public function hasActiveSession()
    {
        $cookie = $this->app['cookie'];

        return $cookie->has($this->config->get('concrete.session.name')) || $cookie->has('ccmAuthUserHash');
    }
1295554
public function checkAuthWithCookie()
  {
    $loadSession = R::findOne('authorization', 'token = ?', array($_COOKIE['auth']));

    if ($loadSession) {
      $loadUser = R::load('users', $loadSession['user_id']);

      $_SESSION['auth'] = [
          'id' => $loadUser['id'],
          'name' => $loadUser['name'],
          'password' => $loadUser['password'],
          'token' => $_COOKIE['auth']
      ];
    } else {
     $this->userExit();
    }
  }