We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26435
    • 1,193 Posts
    On my page, I use the webLogin snippet in a sidebar chunk that is constant on every page. When someone logged in, I wanted them to have the page they were on refreshed with the additional items that they have access to included on that page. I did not want them redirected to a new page. So I modified "weblogin.processor.inc.php" to get the referring page, log the user in, then redirect to the page they were on instead of a page set in, for example the parameter &loginhomeid or &logouthomeid.

    This modification does break the functionality of redirection to a specific page, but for my use, this was never needed. If you have a similar setup to me, a login form on each page, and you want that same page to load on login rather than have the user redirected to a specific page like the site home, you may find this useful.

    Just replace the "weblogin.processor.inc.php" with the one in this zip. It should be in /assets/snippets/weblogin/

    -sD-
    Dr. Scotty Delicious, Scientist.
      Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
      All of the above... in no specific order.


      I send pointless little messages
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Couldn’t you just use [*id*] in the snippet call? &loginhomeid=`[*id*]`
        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