Code: Select all
if (isset($this->request->get['information_id']) && $this->request->get['information_id'] == '{ID}') {
//If the information_id is provided and it matches the ID you wish to protect
if (!$this->customer->isLogged()) {
//If the customer is not logged in already, redirect them to the login page
//Use $this->session->data['redirect'] to redirect them back to this page after logging in
$this->session->data['redirect'] = $this->url->link('information/information', 'information_id=' . $this->request->get['information_id']);
//Do the redirect
$this->redirect($this->url->link('account/login', '', 'SSL'));
}
}