public function logout() { if ($this->isLogin || $this->isGuest) { Forum::kickUser(); } $time = time() + 36000000; $this->isLogin = false; $this->Cookie->write("UTMPUSERID", "", false, $time); $this->Cookie->write("UTMPKEY", "", false, $time); $this->Cookie->write("UTMPNUM", "", false, $time); $this->Cookie->write("PASSWORD", "", false, $time); }
public function logout() { $db = DB::getInstance(); $user = User::getInstance(); $db->delete('pl_api_session', 'where id=?', array($user->userid)); Forum::kickUser(); }