I have a little problem in project with symfony.
I am developing a article website in which normal visitor can see all the article without login and admin can login and add or remove article but admin can remove the comments that are marked as spam in article page after login.The problem is that i have allowed anonymous in article section (main controller) and if i login in admin section still session shows me anonymous user in main controller.? why?
firewalls:
admin_login:
pattern: ^/admin/login$
security: false
main_area:(article area)
pattern: ^/main
anonymous: ~
adminrestricted_area:
pattern: ^/
form_login:
csrf_provider: form.csrf_provider
login_path: _admin_login
check_path: _admin_login_check
logout:
path: _admin_logout
target: _admin_login
only page having /admin
in url shows me the current logged in user but i want to access that user in /main
but in session it shows me
Am i missing something?
I want that if login it should show me the logged in user and if i don't this page should normally be accessed without login?