public function beforeExecuteRoute(Event $event, Dispatcher $dispatcher) {
//Check whether the "auth" variable exists in session to define the active role
$user = $this->session->get('user');
if ($user) {
$role = 'users';
} else {
$role = 'guests';
}
//Take the active controller/action from the dispatcher
$controller = $dispatcher->getControllerName();
$action = $dispatcher->getActionName();
//Obtain the ACL list
$acl = $this->getAcl();
//Check if the Role have access to the controller (resource)
$allowed = $acl->isAllowed($role, $controller, $action);
if ($allowed != Phalcon\Acl::ALLOW) {
$this->flashSession->error("У вас нет прав доступа к этой странице");
return $this->response->redirect('session'); ////////////////////////// <- REDIRECT NOT WORKING
}
$this->view->setVar('user', $user);
}
until recently, worked all fine.
today stopped working this redirect: return $this->response->redirect('session')
all the others work... as, so, I don't understand