0

My question is basically on the title, I've been trying to find some event being dispatched when an user gets locked for password attempts but so far I haven't find anything, maybe I'm coming at this the wrong way but,

What I really need is to execute the customer grid indexer reindex when an user gets locked?

I tried looking at the app/code/Magento/Customer/Controller/Adminhtml/Locks/Unlock.php class but I haven't found a clue.

I would really appreciate your help in this issue.

1 Answer 1

0

There isn't any event by default when the customer gets locked.

The app/code/Magento/Customer/Model/Customer 's isCustomerLocked() defines if the user is locked or not.

I suggest you add a after plugin on this function and dispatch a custom event after checking the return value, and on that event you can run your indexer code. Or you can just add the reindexer code in plugin itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.