I am using CakePHP 2.3.4.
I found that the post data ($this->request->data
) is not ready in AppController::beforeFilter
. It is only available when routed to the action methods (e.g. UserController::login
).
I found that the post data is available after the Controller::startupProcess
where it dispatch a CakeEvent
:
$this->getEventManager()->dispatch(new CakeEvent('Controller.startup', $this));
But I cannot make this call in my AppController::beforeFilter
as it will let the program free run. Is there is a way to make the post data available in AppController::beforeFilter
?