I’m trying to pass information across MSM with the session_id but there seems to be a strange issue. The primary site always returns the correct session_id however the other sites return a different sid value on every page load. To test I’m running a simple function through an extension test… Below is a copy of the function.
function sid(){
return $this->EE->session->userdata['session_id'];
}Why are the other sites generating a new session_id value on each page load?
Thanks, David
After looking into this a bit more I now realize that I was trying to use this in the wrong fashion. So is there a way to share a key value across multiple sites with EE? I’m trying to create a MSM module and need to be able to pass sessions for both guests and logged in users.
Thanks, David
Logged in users are simple (as long as they are logged in to all sites) - you always have the same user id and unique id.
For guests you will need some trickery to make it work. Session ids are periodically regenerated, so you can’t rely on those. They’re also not the same across sites (as you’ve seen).
Are these sites on the same domain (different subdomains)? Or are they completely separate?
Are you trying to have persistent data that is in sync across sites or is it a redirect that only needs to pass it for one request?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.