cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Restrict customer login for storefront

0 Kudos
218

Hi,

I have to create the functionality for not allowing the customer login in to the site based on some business logic if that business login returns true then customer should be login or if business logic returns false then customer should not be logged in and customer should be on Login page only.

Could you please help me how we can restrict the customer login.

Thank you for any help you can offer

View Entire Topic
VinayKumarS
Active Contributor
0 Kudos

Hello

Create a cron job, which execute the business logic and identify the user who is not supposed to be logged in to the storefront. Then disable that user. So that user cannot be able to login until you enable it back.

0 Kudos

Hi Vinay,

Thanks for your response,

But actually I have to handle this scenario in login process directly instead of creating cron job.

VinayKumarS
Active Contributor
0 Kudos

On Submit of the login. Create an event, which gets triggerred to update the user to disabled.