I use symfony sfDoctrineGuardPlugin to manage authentication for both frontend users and backend users. It's fine, except that I don't want frontend users to be able to login to the backend app. I can setup credentials, but credentials are checked after a user gets authenticated. What I want is to have sigin in form to never validate for a user, that is not in a backend group. How can I do this?
Symfony sfDoctrineGuardPlugin custom login query
1.1k Views Asked by Dziamid At
        	3
        	
        There are 3 best solutions below
0
                
                        
                            
                        
                        
                            On
                            
                                                    
                    
                I think you just have to add:
  storage:
    class: sfSessionStorage
    param:
      session_name: sf_backend
at the end of your backend/config/factories.yml
By default, symfony shares session cookies, with this solution, symfony separate this cookies.
I think I found a better solution. sfDoctrineGuard plugin has its own post validator that checks for an optional callable for user retrival.