I set up my app’s authentication system based on the Symfony2 security documentation.
Each one of my users has an active flag. I don’t want users whose active = false to be able to log in.
I don’t really understand where the logic is that says whether or not a user is allowed to log in, so I’m somewhat at a loss as to how to accomplish this. Can someone please steer me in the right direction?
Make your
Userclass implementAdvancedUserInterface— it has theisEnabled()method specifically for that purpose.