From fa514b8a7035cdaeff16092cb4171680dc9ec1e8 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Thu, 15 May 2008 14:12:58 +0000
Subject: [PATCH] Session: Remove $allowcreate parameter from getInstance().

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@570 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/Session.php | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php
index 1f6b35cdb..1f58116f8 100644
--- a/lib/SimpleSAML/Session.php
+++ b/lib/SimpleSAML/Session.php
@@ -105,10 +105,9 @@ class SimpleSAML_Session implements SimpleSAML_ModifiedInfo {
 	/**
 	 * Retrieves the current session. Will create a new session if there isn't a session.
 	 *
-	 * @param $allowcreate  Set this to FALSE to disable creation of new sessions. TRUE by default.
 	 * @return The current session.
 	 */
-	public static function getInstance($allowcreate = TRUE) {
+	public static function getInstance() {
 
 		/* Check if we already have initialized the session. */
 		if (isset(self::$instance)) {
@@ -127,12 +126,6 @@ class SimpleSAML_Session implements SimpleSAML_ModifiedInfo {
 		}
 
 
-		if(!$allowcreate) {
-			/* We aren't allowed to create a new session - return NULL. */
-			return NULL;
-		}
-
-
 		/* Create a new session. */
 		self::$instance = new SimpleSAML_Session();
 
-- 
GitLab