$user["uid"], "hash" => self::getCookieHashForUser($user), "ip" => defaults($_SERVER, 'REMOTE_ADDR', '0.0.0.0')]); } else { $value = ""; } setcookie("Friendica", $value, $time, "/", "", (Config::get('system', 'ssl_policy') == BaseUrl::SSL_POLICY_FULL), true); } /** * @brief Kills the "Friendica" cookie and all session data */ public static function deleteSession() { self::setCookie(-3600); // make sure cookie is deleted on browser close, as a security measure session_unset(); session_destroy(); } }