public function deauthenticate() { if ($this->isLoggedIn()) { $vs_app_name = $this->config->get("app_name"); $this->session->setVar($vs_app_name . "_user_id", ''); //$this->session->deleteSession(); $this->user = null; } }
public static function handler($data = null) { Session::init(); $key = Cache::PREFIX . 'sessionReq_' . Session::getId(); if (apc_exists($key)) { Session::setBatchVars(apc_fetch($key)); apc_delete($key); } $ip = Session::getVar('ip'); if (Session::isLoggedIn() && Session::getVar('lockToIP') && $ip != null && $ip != $_SERVER['REMOTE_ADDR']) { Session::destroy(); header('Location: ' . Url::format('/')); die; } Session::setVar('ip', $_SERVER['REMOTE_ADDR']); $twitter = new twitter(ConnectionFactory::get('redis')); Layout::set('tweets', $twitter->getOfficialTweets()); self::slowBan(); self::errorBan(); }
<?php include "class_session.inc.php"; $session = new Session(); $session->setVar("test", array("a" => 1, "b" => 2)); $session->setVar("test.c", 3); echo "<p><a href=\"test_session.php\">Next</a></p>";
/** * Destroy the password for a mission. * * @param string $handle The name the mission goes by. */ public static function destroyPassword($handle) { Session::setVar('mission-' . $handle . '_password', false); }