Deny logon for "inactive" users in Symfony2

I installed an application authentication system based on the Symfony2 security documentation .

Each of my users has a flag active. I do not want users with active= false to be able to log in.

I really don’t understand where the logic says whether the user is allowed to log in, so I don’t understand a bit how to do this. Can someone please me in the right direction?

+5
source share
1 answer

Make your class User AdvancedUserInterface- it has a method isEnabled()specifically for this purpose.

+17
source

All Articles