We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    That would work, but I think this in a snippet (or plugin) might be a more generic solution:

    $ctx = $modx->context->get('key')
    if (! $modx->user->hasSessionContext( array($ctx));
    $modx->sendUnauthorizedPage();
    


    I’m not confident on this until OpenGeek settles how it should work, but I’m fairly sure that I’ve tested it and found it to toss the user out if he or she is not logged in in the current context.
      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