I have created a custom login module which loads a page to be used by a particular customer group with its own URL trade/account/login
. However, I've noticed that if a user tries to login with an incorrect username and password the page redirects back to the default customer/account/login
URL.
Is there a way I can keep the customer on the same page if they enter the wrong login details?
I would like to keep them on
trade/account/login
instead of redirecting to the customer account login customer/account/login
So far I only have this in my controller which loads the customer login page and form this works fine but doesn't keep the user on the same page if they enter the wrong username or password
<?php
class Namespace_Customlogin_AccountController extends Mage_Core_Controller_Front_Action{
public function LoginAction() {
$this->loadLayout();
$this->renderLayout();
}
}
I'm looking into the AccountController.php but I cannot see where the redirect happens so would like to ask if anyone knows where I can override it in my module please?
AccountController.php
filetrade/account/loginPost
not sure if I am even doing this correctly at the moment...