-
☆ A M B ☆
- 1,231 Posts
I need some help with sharing SESSIONS amongst modx and another app. Is it right that as long as the 2 apps are on the same server/domain it should be fairly straight forward to work with?
How would I go about gathering SESSIONS from one app in to modx? I know this is rather vague but I am just wondering if it’s as straight forward as I hope. Modx uses session_start() as does the second app, how can I take $_SESSION[’id’] from app 2 in to modx? Do I have to define something, include a file or use globals? SMF was fairly easy due to the usage of SSI but now I’m stuck with trying to access SESSIONS from another app.
Thanks
-
☆ A M B ☆
- 24,524 Posts
MODx uses a unique session_name. This is automatically created at installation, and can be found in your config.inc.php file.
-
☆ A M B ☆
- 1,231 Posts
Sorry Susan I don’t understand how that will help me? Could you give me a little explanation please?
-
☆ A M B ☆
- 1,231 Posts
Thanks OG for the info. I actually created a plugin that ties in to the SSI.php of SMF and managed to join them both up but required quite a lot of work. It was doable due to the SSI feature of the SMF forum.
I wonder if something like the SSI would work for another app.
-
☆ A M B ☆
- 24,524 Posts
my grandmother taught me not to say anything at all if I couldn’t say anything nice
Every now and then you guys make me feel ancient... it was my mother telling me that.
-
☆ A M B ☆
- 1,231 Posts
OG, what I have created takes a users ID from the SSI. SSI has a full array of SESSIONS from SMF so you can easily tap in to the information. I then created a plugin that took the users info from the SSI and sent it to custom tables that modx will use. The plugin also updates modx tables if any changes are made on the SMF side but only if the user accesses areas of modx that displays any of the users details. The user still signs in to SMF but I have allowed access to modx by using the SESSIONS from smf. I don’t actually know how good my coding is but it works. It’s been a very big project and I’m still working on it.
Once the site is actually fully integrated I will post what I have done.