concrete5 session urgent help

Permalink
Hi,

I have a problem, I have a customer that needed an updated design, so I figured to upgrade their old 5.6 version to version 7. However they are using another web system that needs to share the sessions with concrete5. This worked in version 6.

What can I do to share the same sessionId between concrete5 and the other system. Before
i could just check if a user has logged in by checking if the $_SESSION['logged'] = 1;

This does not seem to work in concrete5.7
What can I do?

 
mnakalay replied on at Permalink Reply
mnakalay
checking if a user is logged in is not done through the session data, you just need to do
$u = new User();
  if($u->isLoggedIn()) {
    // do something
  }

The same way it used to be with 5.6

Getting the session id however is another matter and right now I don't really know how to do it.
mongoDada replied on at Permalink Reply
Hi mnakalay,

Thanks for fast answer. The problem is the other system has it's own session handling and it uses the $_SESSION variables. I think I have to be able to use the same session file. However maybe I can do some kind of script that checks the other system via AJAX instead...
hummms...
mnakalay replied on at Permalink Best Answer Reply
mnakalay
you can try
if (isset($_SESSION['_sf2_attributes']['uID']) && $_SESSION['_sf2_attributes']['uID']) {
    // user is logged in do your thing
}