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

    In our environment there are two possibilities to login (web and mgr):
    - use the local username/password managed by modx
    - use the single-sign-on tool

    The single-sign-on tool can be configured to protect certain urls. When these URLs are requested the tool fetches the request before the HTTP-Server gets it, authenticates the user, sets the user’s informationen to the http header and returns the request to the http-server.
    I’d like to retrieve these information in a snippet for setting up a valid session for the user. Retrieving the information is easy but is there something like a modx->setAuthenticatedUser(modUser) method available?

      Add-On to easily manage your multilingual sites: Babel
      • 19534
      • 183 Posts
      I found

      $user->addSessionContext('web');


      I think this does exactly what I was looking for, does it?
        Add-On to easily manage your multilingual sites: Babel