Yesterday everything is fine but today the logout function does not work anymore and access to the path / users no longer valid but when I run / users / index its worck here is an explanatory video and my code https://youtu.be/C-1aUF2I-ac
function beforeFilter()
{
parent::beforeFilter();
$this->Auth->allow('login','add');
$this->Auth->authError = __('Vous devez être connecté.');
$this->Auth->loginError = __('E-mail ou mot de passe invalide, veuillez réessayer');
}
function login()
{
if ($this->request->is('post'))
{
if ($this->Auth->login())
{
$this->redirect(array('action' => 'view'));
}
}
}
public function logout()
{
$this->Auth->logout();
$this->redirect(array('action' => 'login'));
}
public function index()
{
$this->paginate = array(
'limit' => 1000,
'order' => array(
'User.id' => 'desc'
));
$this->User->recursive = 0;
$this->set('users', $this->paginate());
}
AppController.php
class AppController extends Controller
{
var $components = array('Auth','Session');
function beforeFilter()
{
//$this->Auth->allow(array('*'));
}
}
in my hosting have php 5.6.29 version for cake is 2.3.4