A
A
Artemio Vegas2017-06-14 16:05:21
symfony
Artemio Vegas, 2017-06-14 16:05:21

Symfony how to redirect authorized users when visiting certain pages?

Good afternoon!
I am implementing a training project on symfony, the task arose to redirect authorized users when they try to visit the authorization pages, registration, and a few more.
Of course, you can check this in the controller, but this is not according to Feng Shui, in Google I saw something about listeners that will work before executing the controller, tell me which way to dig.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artemio Vegas, 2017-07-12
@ArtemioVegas

Indeed, in this case, you need to use kernel.request event symfony.com/doc/current/reference/events.html#kern...
I found an example of the implementation of the functionality I needed here - https://coderwall.com/p/w0yyag/redirect -authentica...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question