How to lock/unlock customers in Magento 2

How to lock/unlock Customers in Magento 2

In this tutorial, we explain how to lock/unlock customers in Magento 2.

To secure online stores, Magento 2 basically has this feature that locks the users who want to log in and type the wrong password multiple times.
This is done due to prevent spamming inside the store, and hackers and robots from infiltrating online stores.
A locked user account appears in the Locked Users grid and you can change the settings about the locked users.

Related posts: The Ways to Optimize Magento Checkout Process

Learn more about how to lock/unlock, Customers

Stay with us until the end of this article and follow the steps.

 

Log on Admin Panel > Stores > Settings > click on Configuration.

 

How to lock/unlock customers in Magento 2
How to lock/unlock customers in Magento 2

 

In the open window click on Customers and choose Customer Configuration from the left panel.

 

How to lock/unlock customers in Magento 2
How to lock/unlock customers in Magento 2

 

 

How to lock/unlock customers in Magento 2
How to lock/unlock customers in Magento 2

 

Expand Password Options Section > Maximum Login Failures to Lockout Account.

 

How to lock/unlock customers in Magento 2
How to lock/unlock customers in Magento 2

 

With this option, you can limit the number of repeats of failed log-in. This option is set ten times by default but you can change it as you want.

 

How to lock/unlock customers in Magento 2
How to lock/unlock customers in Magento 2

 

In the next part of the tutorial, we explain how to unlock the users. May a person who makes a mistake too many times to log in isn’t a hacker or robot but be locked. In these cases, we need to unlock our customer, for doing that, follow the steps.

Log on Admin Panel > System > Permissions > Locked Users.

 

 

How to lock/unlock customers in Magento 2
How to lock/unlock customers in Magento 2

 

According to the picture below, select locked users who you want to unlock and choose Unlock option from the frame finally click on the “Submit” button. Now accounts are unlocked.

 

How to lock/unlock customers in Magento 2
How to lock/unlock customers in Magento 2

 

There are some questions that you may ask yourself:

How to unlock the user (customer) from the database?

You can Unlock it directly over the database, to do that go to the customer_entity table.
Set ‘lock_expires’ = ‘Null’

 

How to lock a particular customer account in Magento 2?

 

Sometimes you prefer to lock some of your customers and Magento has this feature to lock a customer. If you need to lock a particular customer study this article until the end.

 

Magento2 admin account disabled error?

Magento security system is set up to disable accounts with weak passwords. You may encounter an admin account disabled error when your Magento account does not have a strong password. So the solution for your problem is using a strong password, which is a combination of uppercase and lowercase letters and special characters such as ‘@’. 

As you saw this part was easy like other parts. I hope it was useful for you.