Guys there is a description about how to make 'isEnabled' (active\inactive account) on registration.
http://symfony.com/doc/current/cookbook/security/entity_provider.html#forbid-inactive-users
But there is NO description how to get this error on login action. For example I have working properly registration where user account default is inactive. After user login how can I get "inAcitve" if account is not activated by email link?
Is pretty easy: you can create a service that will act as a event listener
tags part is there because, on bootstrap of your application, kernel will "attach" certain type of events to your service and will call a method on that service each time this event is raised. So
kernel.event_listeneris there because every event listener have to be tagged that way (follow it as a "rule") andsecurity.interactive_loginwill be fired as a user succesfully log in.Your class could be something like