We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Dispatcher Question

Hi I have a little question about of dispatcher:

In my controllerbase I’m using the action BeforeExecuteRoute to ACL, and I pass a flash message to know the actual route.

So, sometimes the flash message is printed two (2) times, first with the last route and second with the actual route when I use the forward method.

For example:

To login I’m using the library auth, but when It enter to process and not find coincidence, this redirect to login but display two messages:

session/index y session/start – Is it a problem?



2.3k
Accepted
answer

This is correct behavior. When you user forward BeforeExecuteRoute is used two times.



17.7k
edited May '15

Thank´s =)