Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
<?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>";
Ejemplo n.º 4
0
 /**
  * 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);
 }