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
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
-
☆ A M B ☆
- 24,524 Posts
Which version of MODx? Which login script?
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
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.
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
Wouldnt it just work to add the redirect code into the lgnErrTpl chunk as a snippet or something?