I'm using CakePHP 4.0.4 and the latest CakeDC plugin.
My configuration:
Application.php
class Application extends BaseApplication
{
public function bootstrap(): void
{
... standard CakePHP code ...
$this->addPlugin(\CakeDC\Users\Plugin::class);
}
AppController.php
class AppController extends Controller
{
public function initialize(): void
{
parent::initialize();
$this->loadComponent('RequestHandler');
$this->loadComponent('Flash');
}
}
EventsController.php
class EventsController extends AppController
{
public function beforeFilter(\Cake\Event\EventInterface $event)
{
parent::beforeFilter($event);
$this->Authentication->allowUnauthenticated(['index']);
}
public function index($type='')
{
When going to the events page, it keeps redirecting me to the login page. What am I not seeing here?
[EDIT]
I've noticed that the beforeFilter() of EventsController isn't called.