We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25046
    • 194 Posts
    I am using WebLogin 1.0 with ModX 0.9.5 and am running into some difficulties. I have four users (I am using them for restricted public access to separate projects) set up and each user has a private home (or "project") page.

    Everything works great EXCEPT when a user logs out and then attempts to log in as another user (to access a different project page). What happens is when the user logs in as the second user, the correct user home (or project) page URL displays, however the page that actually shows in the browser is the page I’ve chosen for the unauthorized page. However, if I close the browser and restart it, then relogin, everything works OK.

    Any suggestions! Thanks!
      • 25046
      • 194 Posts
      Just to add another point about this. When I logout and then login as the same user I just logged out as, I get sent to the right URL but I am displayed the unauthorized page. Maybe this has something to do with the logout function not working properly? Or is this a cache problem? huh
        • 32525
        • 27 Posts
        Have you tried setting those user pages to be uncacheable?
          • 25046
          • 194 Posts
          Yes, the page with the snippet is set to not cache and the snippet itself is non-caching. Here is the snippet call I used:
          [!WebLogin? &loginhomeid=`39,40,43,44` &logouthomeid=`47`!]

          I have also tried setting all protected pages to not cache - with no luck.

          The only surefire way of getting the login to work, at least temporarily (and I have tried this with both IE7 and FireFox on both my PC’s) is to close the browser and restart it, then login. It works the first time (for the first user) but as soon as I log out, I cannot successfully login anymore - it just sends me to my unauthorized page, even though the right URL shows in the URL address line.

          I am wondering if I should try the WebLoginPE snippet instead and hope it works??
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Sounds like a cookie issue; the logout apparently isn’t properly clearing the cookies.
              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
              • 25046
              • 194 Posts
              Yes, I agree this sounds like a cookie issue but I am not sure how to resolve it.

              For reference, I also tried WebLoginPE however I ran into the same problems. Logout "appears" to work but doesn’t and I have to close and restart the browser to login as another user.

              Thanks