Skip to content
Snippets Groups Projects
Commit b8ce6906 authored by Olav Morken's avatar Olav Morken
Browse files

openid: Fix session_start being called multiple times.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2239 44740490-163a-0410-bde0-09ae8108e29a
parent 53c02b61
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,19 @@ require_once('Auth/OpenID/SReg.php');
require_once('Auth/OpenID/Server.php');
require_once('Auth/OpenID/ServerRequest.php');
session_start();
/*
* The OpenID library uses the $_SESSION variable, so we may need to
* initialize the session.
*
* We first initialize the SimpleSAML_Session object, to allow its configuration to
* take precedence. If the SimpleSAML_Session object doesn't use the PHP session, we
* will initialize the PHP session with default settings.
*/
SimpleSAML_Session::getInstance();
if(session_id() === '') {
/* PHP session not initialized - start session. */
session_start();
}
$config = SimpleSAML_Configuration::getInstance();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment