i am using magento 1.9.2.4 and i am creating a module that will check if page is not registration page or login then it will redirect to home page is there any way to know that if current page is login page or customer registration page ? thanx in advance.
1 Answer
You can call below function in your template and get page info in magento 1 ,
$request = $this->getRequest();
$modulename = $request->getModuleName();
$controller = $request->getControllerName();
$action = $request->getActionName();
if($modulename == 'customer' && $controller == 'account' && $action == 'login')
{
//login page
}
if($modulename == 'customer' && $controller == 'account' && $action == 'create')
{
//registration page
}