Log incident when account is locked after three failed attempts with Devise

I want to enter the database when the incident when the user account is locked, I use Rails3 and Devise, so I think I need to redefine some actions in the Devise controller, I just don’t know the controller / action and how to capture the user ID. Any tips?

+1
source share
1 answer

I know this is an old question, but the easiest approach is probably to override lock_access! from a lockable mixin (in your user model):

def lock_access! super # record an account lock here end 
0
source

All Articles