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

    Is there anything like ManagerLogin but for Revo so that we can also login in frontend and get to the modx manager?
    http://modxcms.com/forums/index.php/topic,52980.msg306711.html

    Thanks for your answer.
      • 3749
      • 24,544 Posts
      In Revolution, there’s no distinction between Web and Manager users. I’m guessing here, but I suspect that a front-end user has no session context for the Manager context. Their user group will need a Context Access ACL entry with a context of ’mgr’ before any of this will work.

      I would try this:

      Redirect them to a page in the front end with a call to this snippet on it:

      $modx->switchContext(’mgr’);
      $modx->sendRedirect(’url/of/desired/manager/page’);


      Just go to the page you want to send them to in the Manager and copy the URL to the link in the snippet.

      If you get an "Access Denied" message, it probably means you’re on the right track but the user’s permissions aren’t right.


      Note that if you test this while previewing from the Manager, you might get odd results.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36225
        • 20 Posts
        I’ve tried but it doesn’t work.

        My situation: a user has access to the manager as an editor for a given page only. In frontend, he can also access to an intranet that explain to him how to fill his page in the manager.
        This user can login via mysite.com/manager and get directly to the editing for his page.
        This user can login in mysite.com intranet and get the instructions.
        Both logins work separately.

        My wish: add a redirection page in the frontend intranet that leads that user directly to his manager resource without any login again.

        I’ve tried the following snippet in the redirection page:

        $modx->switchContext('mgr');
        $path = $modx->getOption('base_url',null,MODX_BASE_URL);
        $modx->sendRedirect($path.'manager/index.php?a=30&id=2');


        The redirection is done, but I get the manager login form and not the resource page.
          • 3749
          • 24,544 Posts
          Sorry, I thought it might work. It looks like the user still doesn’t have a session context in the Manager.

          You might try just adding the following property to your front-end Login tag:

          &contexts=`web,mgr`


          In theory, that would log the user into both contexts and the switch might work.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting