Browse Source

Fixed an error when trying to logout in two tabs

Tobias Reich 10 years ago
parent
commit
1dce04fa92
1 changed files with 10 additions and 2 deletions
  1. 10 2
      php/access/Guest.php

+ 10 - 2
php/access/Guest.php

@@ -16,7 +16,7 @@ class Guest extends Access {
 		switch ($fn) {
 
 			# Album functions
-			case 'getAlbums':		$this->getAlbums(); break;
+			case 'getAlbums':			$this->getAlbums(); break;
 			case 'getAlbum':			$this->getAlbum(); break;
 			case 'checkAlbumAccess':	$this->checkAlbumAccess(); break;
 
@@ -25,7 +25,8 @@ class Guest extends Access {
 
 			# Session functions
 			case 'init':				$this->init(); break;
-			case 'login':			$this->login(); break;
+			case 'login':				$this->login(); break;
+			case 'logout':				$this->logout(); break;
 
 			# $_GET functions
 			case 'getAlbumArchive':	$this->getAlbumArchive(); break;
@@ -121,6 +122,13 @@ class Guest extends Access {
 
 	}
 
+	private function logout() {
+
+		$session = new Session($this->plugins, $this->settings);
+		echo $session->logout();
+
+	}
+
 	# $_GET functions
 
 	private function getAlbumArchive() {