I want to disable the page if user is signed in and then redirect them back to the page he was originally in.
What I have:
public function indexAction()
{
Tag::setTitle('Home');
if($this->component->user->hasSession()){
$this->view->disable();
$this->response->redirect($this->request->getServer('HTTP_REFERER'));
}else{
parent::initialize();
}
}
But this gives me a redirect loop. Thanks for the help in advance.