Full course available at https://www.codereviewvideos.com/cour...
In this video we are going to look at how we can redirect our Users after they have either logged in, or just registered on our site.
Interestingly, both of these situations - log in, and registration - likely already have the desired redirection in place without you needing to configure anything.
Here is what happens by default:
If a User is trying to access a page that requires log in, and they haven't logged in yet, then once they have successfully logged in they will be redirected back to the original page they were requesting.
If a User is trying to access a page that requires log in, and they haven't registered yet, then once they have successfully registered they will have a clickable link allowing them to head back to the original page they were requesting before they registered.
Being Symfony, we are of course, free to customise and tweak this flow to meet whatever needs we have.
Most of the changes we are going to make are not specific to FOSUserBundle. These options apply to any form_login config we may need to set up. The only difference with FOSUserBundle will be in our Registration flow.
If you are unsure of any of the available configuration options then be sure to check out the Symfony Security Bundle Configuration reference.
The section we are interested in for the purposes of this video is the form_login section.
https://codereviewvideos.com/course/g...
Смотрите видео FOSUserBundle [11/15] - How to Redirect a User After Login or Registration онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Code Review Videos 20 Март 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,141 раз и оно понравилось 1 людям.