We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32424
    • 19 Posts
    I’m not sure how possible this is, but I have created a module for the Manager that simply redirects to a page outside the manager like so:

    header("Location: http://mydomain.com/pages/index.php");

    The page is on the same domain MODx is installed on.

    I want to somehow tap into the MODx authentication so that if a user isn’t accessing this page from within the Manager (and thus isn’t logged in), it cannot be browsed to directly.

    Is that possible? Can someone point me to a reference to tap into the MODx session or something?

    Thanks!
      • 10226
      • 412 Posts
      Can you not use tradition groups and users? .htaccess maybe?
        • 32424
        • 19 Posts
        I suppose that is an option, but I didn’t want people to have to log in a second time if they are already logged into the manager.
          • 22303 MODX Staff
          • 10,725 Posts
          Modules will only run within the manager module framework. Requests outside of that will not have access to the session, or, more importantly, to the $modx object or environment.
            • 32424
            • 19 Posts
            Quote from: OpenGeek at Sep 20, 2007, 03:55 PM

            Modules will only run within the manager module framework. Requests outside of that will not have access to the session, or, more importantly, to the $modx object or environment.
            I was afraid of that. Thanks for the response. Time for plan B...