From 0171853f1d3e181422cb32dabce73168634670b9 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 12 Jul 2009 22:03:05 +1000 Subject: [PATCH] Fix tree was remembered empty with anonymous --- lib/ds.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ds.php b/lib/ds.php index 706c4f2..f3e09ad 100644 --- a/lib/ds.php +++ b/lib/ds.php @@ -144,11 +144,11 @@ abstract class DS { * If this returns '', we are logged in with anonymous */ public function getLogin($method=null) { - $method = $this->getMethod($method); - if ($method == 'anon') return ''; + $method = $this->getMethod($method); + switch ($this->getAuthType()) { case 'config': if (! isset($_SESSION['USER'][$this->index][$method]['name'])) @@ -313,6 +313,8 @@ abstract class DS { public function logout($method=null) { $method = $this->getMethod($method); + unset ($_SESSION['cache'][$this->index]); + switch ($this->getAuthType()) { case 'config': return true;