Jump to content

Session killed after IPS login status check


Jibeji

Recommended Posts

Hello,

I am using sessions but it is killed after having check whether the user is connected :

session_set.php

<?php
session_id("MySession");
session_start();
$_SESSION["test"] = "Hello !";

var_dump($_SESSION);
?>

returns

Quote

array(1) { ["test"]=> string(7) "Hello !" }

 

session_read.php

<?php
session_id("MySession");
session_start();

var_dump($_SESSION);
?>

returns

Quote

array(1) { ["test"]=> string(7) "Hello !" }

 

but session_read_after_ips.php

<?php
require_once(dirname(__FILE__).'/../forums/init.php');
\IPS\Session\Front::i();

if(\IPS\Member::loggedIn()->member_id) {
   echo "Logged in<br />";
} else {
   echo "Not logged<br />";
}

session_id("MySession");
session_start();

var_dump($_SESSION);
?>

returns

Quote

Logged in
array(0) { }

 

Starting my own session before or after \IPS\Session\Front::i(); does not change the behaviour.

Is there a solution ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...