mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
MVC: call initialize() after authentication, which is the same as it was in Phalcon earlier.
This fixes a small regression not being able to access user data during init and prevents executing code before the user is authenticated, although in practice this is only boilerplate in our codebase.
This commit is contained in:
parent
c5ef6d5fe8
commit
dd595b9a78
@ -157,11 +157,12 @@ class Dispatcher
|
||||
$controller->response = $response;
|
||||
$controller->security = new Security($session, $request);
|
||||
|
||||
$controller->initialize();
|
||||
|
||||
if ($controller->beforeExecuteRoute($this) === false) {
|
||||
return false;
|
||||
}
|
||||
/* call initialize() after authentication */
|
||||
$controller->initialize();
|
||||
|
||||
$this->returnedValue = $controller->{$this->action}(...$this->parameters);
|
||||
$session->close();
|
||||
$controller->afterExecuteRoute($this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user