We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40734
    • 3 Posts
    hi,

    ive been spending hours trying to find a solution to this.
    ive whmcs login logged in on another directory.
    i need to get $_SESSION["uid"] from the logged in user from within modx,
    how do i do that?

    thank you
      • 40734
      • 3 Posts
      anyone have any idea?
      or at least, how do i retrieve the session id of the public session ,
      the one not in modx?
      • Vanilla does it by using AJAX to call a MODx page. The MODx page contains a snippet to return the info from the SESSION that is generated when the MODx page is generated. It only works if Vanilla and MODx are on the same domain, as it gets the session file name from the session cookie, so the user on the Vanilla page has access to the same cookie. The Vanilla plugin has to be given the name of that cookie so it can get the session name from it.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 35814
          • 7 Posts
          hey Towila,

          just wanted you to know that your Reply #10 solved my problem where I wasn't able to view unpublished ressources while logged-in at the manager.

          While Manager-login via domain.tld and viewing unpublished ressource www.domain.tld failed a new Manager-login via www.domain.tld did the job smiley

          Thank you!