/** * Kills the current session and make user as guest. * * Behaviors BeforeSessionKill and AfterSessionKill are defined. */ public function kill() { $config = Config::getInstance(); $this->trigger("BeforeSessionKill"); Controller::getInstance()->cookies[$config->session->cookie->name] = array("value" => null, "expire" => time() - 1000); $this->engine->kill($this->id); $this->setupGuest(); $this->trigger("AfterSessionKill"); }