This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Authenticated user on public page

About symfony tutorials, symfony book and API documentation.

Authenticated user on public page

by mbb84 » Sat Aug 25, 2012 10:34 am

Hi,

I am new on SF and i have a question about the default authentication implementation.

In my project i have different pages and some of these pages are secured by the firewall:

Code: Select all
    firewalls:       
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        login:
            pattern:  ^/secure/login$
            security: false

        secured_area:
            pattern: ^/secure
            form_login:
                check_path: /secure/login-check
                login_path: /secure/login
            logout:
                path:   /secure/logout
                target: /


The authentication and authorization works fine but my problem ist, that i need the currently authenticated user on public pages.

Example:
I have a details page that is visible for anyone, but if there is an authenticated user, i will display additional informations.

Thanks for help ...
mbb84
Junior Member
 
Posts: 1
Joined: Sat Aug 25, 2012 10:14 am