We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    How do I redirect a failed login to a new page rather than just on the same page as the login form? i.e. I have a small form with just user name & password, if a user fails authentication, I want them redirected to the full login page with the links for ’register’ and ’forgot password’ [and the base instructions as to why login may have failed]

    -thanks
    -sean
      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525
      • 26503
      • 620 Posts
      anyone know how to do this???

      HELP!
        *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

        Sean Kimball CLP, CLS.
        Technical Director / Sr. Developer | BigBlock Studios
        ._______________________________________________.
        Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
        27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
        phone/fax: 905-426-5525
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Which version of MODx? Which login script?
          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
          • 26503
          • 620 Posts
          I’m using revo and just the basic !login/register add on... [there’s more than one?]

          -thanks
            *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

            Sean Kimball CLP, CLS.
            Technical Director / Sr. Developer | BigBlock Studios
            ._______________________________________________.
            Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
            27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
            phone/fax: 905-426-5525
            • 3749
            • 24,544 Posts
            Quote from: sean69 at May 10, 2011, 02:57 PM

            How do I redirect a failed login to a new page rather than just on the same page as the login form? i.e. I have a small form with just user name & password, if a user fails authentication, I want them redirected to the full login page with the links for ’register’ and ’forgot password’ [and the base instructions as to why login may have failed]

            -thanks
            -sean

            I don’t think this is possible with Login without a custom snippet, though it’s a good feature request (adding a &failureRedirect property). You could just put the register and forgot password tags below the login form.

            If you have a login redirect for successful logins, I think you could put a snippet at the bottom of the page that tests for submission and forwards the user to the failure page. A successful login won’t reach that point. See the login code for how to test for submission, then, if it’s a submission, do this:

            $modx->sendRedirect($modx->makeUrl(12)); // replace 12 with the id of the failure page.

              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
              • 26503
              • 620 Posts
              I did wind up fiddling around with something like that - but wound up retooling the login form & submitting a feature request.

              -thanks
              -sean
                *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

                Sean Kimball CLP, CLS.
                Technical Director / Sr. Developer | BigBlock Studios
                ._______________________________________________.
                Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
                27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
                phone/fax: 905-426-5525
                • 47714
                • 13 Posts
                Wouldnt it just work to add the redirect code into the lgnErrTpl chunk as a snippet or something?